Amargi Agents
Last updated: 2026-05-17
Overview
Amargi Agents is a multi-tenant AI agent runtime. You define an agent with a Role + System prompt + Tools list, then invoke it from anywhere (Reach AI auto-replies, Escalate AI suggestions, your own systems via API). Every Run is captured in full detail: model invocations, input/output tokens, USD cost, latency, tool calls (with inputs and outputs), and the final decision.
We run on Anthropic Claude by default (contractually bound not to train models on customer prompts/responses). Enterprise teams can plug in their own API keys or self-host.
Quickstart
- Open app.amargicreative.com → Agents.
- Click "New agent". Enter the name, the role (e.g. "Support Classifier"), and the system prompt.
- Attach tools — pick from the built-in tool library (lookup_order, send_email, query_kb) or register custom tools via a capability manifest.
- Test in the playground: enter a message, watch the run stream live with every tool call + reasoning step.
- Hook it to a trigger — listen to inbound Reach messages, or invoke from Escalate on ticket-opened, or call from your own API.
Key concepts
Agent
A static definition that says how the agent behaves when invoked. Contains: name, role, system prompt, allowed tools list, LLM model (claude-sonnet-4, etc.), cost guardrails, max turn count (to prevent loops).
Tool
A function the agent can invoke. Defined by a JSON schema (name, description, inputs, outputs). Tools are either built-in (managed by Amargi, e.g. query_kb) or custom (you register an HTTPS endpoint, the Agents runtime invokes it when needed).
Run
A single invocation of the agent. The record contains: the input (the initial message), every turn of the model loop (reasoning + tool calls + tool responses), the final output, input/output tokens, USD cost, latency. Each run writes a row to escalate.agent_runs.
Capability manifest
A registerable JSON document that describes a custom tool: name, description, input schema, output schema, invocation URL (HTTPS, must be HMAC-signed). Lets teams add internal tools (lookup_account, charge_card, etc.) to their organization's tool library without writing code.
Approval chains
For high-stakes tools (transferring money, deleting data, sending to an external customer), you can set a "requires human approval" policy. When the agent tries to invoke that tool, the run pauses, a task is created for a human reviewer, the run resumes after approval (or fails on rejection). Every approval is logged.
Common tasks
Create a classifier agent
- Agents → New agent
- Role: "Support Classifier".
- System prompt: "Classify the incoming support message into billing | shipping | bug | general."
- Tools: none (plain output is enough).
- Model: claude-haiku-4 (for speed + cost).
- Save, test in the playground.
Register a custom tool
- Write a JSON manifest describing the tool (name, inputs, outputs, URL).
- Tools → Register manifest — paste the JSON.
- Agents generates an HMAC secret. Your tool server must verify the X-Agents-Signature header.
- Use the tool in any agent definition.
Invoke an agent from API
- Get an API key from Hub (Settings → API Keys).
- POST to
https://agents.amargicreative.com/api/v1/agents/:id/runswith JSON body { "input": "...user message..." }. - Response contains run_id (for later querying) and the final output.
Monitor costs
Every run logs USD cost in the cost_usd field. Aggregated automatically per day + agent on the "Agent activity" card on the Reports page. Set monthly cost-threshold alerts in Settings → AI Cost Quota.
API reference
All Agents endpoints sit under https://agents.amargicreative.com/api/v1/.
GET /api/v1/agents— List agents.POST /api/v1/agents— Create a new agent.GET /api/v1/agents/:id— Retrieve an agent.POST /api/v1/agents/:id/runs— Invoke an agent (synchronous).POST /api/v1/agents/:id/runs/async— Invoke an agent (asynchronous, returns run_id immediately).GET /api/v1/runs/:id— Retrieve a run with full details.GET /api/v1/runs— List runs. Filter by agent_id, from, to, agent_role.GET /api/v1/runs/summary— Aggregate summary (runs per day, cost, tokens).POST /api/v1/tools— Register a custom tool via manifest.GET /api/v1/tools— List tools (built-in + custom).POST /api/v1/approvals/:id/approve— Approve a paused run.
Integration with other products
- Reach — AI auto-replies invoke agents when a WhatsApp message arrives. The run shows up in the conversation log + operator panel.
- Escalate — Invokes agents on ticket.opened to suggest a resolution (shown to the operator as an "AI suggestion" they can accept/reject).
- Your systems — Invoke from any backend server via API. Useful for ticket summarization, email classification, or any task that benefits from an LLM.
Getting help
- Email support: contact@amargicreative.com
- Privacy posture (Anthropic training, run retention): privacy posture.