Configure autonomous agents with instructions, tools, memory, guardrails, and approval workflows.
Agents are autonomous workers that can execute complex multi-step workflows, make intelligent decisions based on conditions, and learn from past executions. Unlike simple workflows that follow a fixed sequence of steps, agents can reason about their tasks, choose which tools to use, and adapt their approach based on the results of previous actions.
Agents run in sandboxed cloud environments with full access to your configured integrations. They can be triggered manually, on a schedule, or by events — just like workflows — but they operate with a higher degree of autonomy and intelligence.
Each agent consists of four core components:
Create a new agent from the dashboard by navigating to Agents → New Agent, or use the CLI for a faster setup:
okinawa agent create --name "Lead Processor" --model default
This creates a basic agent with default settings. To customize during creation:
okinawa agent create \\\n --name "Lead Processor" \\\n --model advanced \\\n --tools slack,salesforce,sendgrid \\\n --memory enabled \\\n --max-steps 25 \\\n --timeout 300
The --model flag selects the AI model powering your agent. default balances speed and capability, while advanced provides deeper reasoning at the cost of slightly longer execution times.
Agent instructions are the most important part of configuration. Well-written instructions lead to reliable, predictable behavior. Here's a framework for writing great instructions:
instructions:\n goal: |\n Process incoming leads from the website contact form.\n Enrich each lead with company data from Salesforce.\n Score the lead based on company size and engagement.\n Route high-value leads to the sales team immediately.\n\n constraints:\n - Never send more than 5 Slack messages per hour\n - Always verify email format before creating CRM contacts\n - Do not create duplicate Salesforce leads\n - Wait at least 60 seconds between API calls to avoid rate limits\n\n behavior:\n - If the lead score is above 80, send an immediate Slack alert to #sales-leads\n - If the lead score is between 50-80, add to the nurture campaign in HubSpot\n - If the lead score is below 50, log for future analysis only\n - Always include the company name, lead score, and source in notifications
Grant agents access to specific tools and integrations. Each tool can be configured with fine-grained permissions:
tools:\n - name: slack\n permissions:\n - sendMessage\n - readChannels\n restrictions:\n allowed_channels: ["#sales-leads", "#marketing"]\n \n - name: salesforce\n permissions:\n - createLead\n - updateContact\n - searchAccounts\n restrictions:\n max_api_calls_per_run: 50\n \n - name: sendgrid\n permissions:\n - sendEmail\n restrictions:\n allowed_templates: ["welcome-v2", "nurture-sequence-1"]
By explicitly defining what each tool can do, you ensure the agent operates within safe boundaries even when making autonomous decisions.
Enable the memory system to let agents learn from past executions. Memory works in three modes:
Configure memory in the agent settings:
memory:\n enabled: true\n mode: workflow\n retention: 90d\n max_entries: 1000\n include:\n - successful_resolutions\n - error_patterns\n - user_preferences
For agents that perform sensitive operations, configure approval workflows:
guardrails:\n require_approval:\n - action: delete*\n message: "Agent wants to delete: {{action.target}}"\n - action: sendEmail\n when: "{{action.recipients | length}} > 10"\n message: "Agent wants to email {{action.recipients | length}} recipients"\n - action: salesforce.updateOpportunity\n when: "{{action.fields.amount}} > 50000"\n message: "Agent wants to update opportunity worth ${{action.fields.amount}}"\n\n spending_limits:\n per_run: 1.00\n per_day: 10.00\n per_month: 100.00\n\n rate_limits:\n max_actions_per_minute: 30\n max_api_calls_per_run: 100
When a guardrail triggers, the agent pauses and sends an approval request to the designated approvers via Slack, email, or the dashboard. Approvers can approve, reject, or modify the proposed action.
Track your agents' performance from the Agents → Monitoring dashboard:
Set up alerts for abnormal behavior: high error rates, unexpected cost spikes, or guardrail violations. All monitoring data is available via the API for integration with your existing observability stack.