Authentication
Every endpoint below is agency-scoped. Authenticate with your Agency API key as a Bearer token (Settings → AI & Keys → Agency API Key). The same endpoints also accept a logged-in session cookie. The agency is always resolved from your key — never pass an agency_id in the body; you can only ever touch your own agency's data.
Authorization: Bearer YOUR_AGENCY_KEY
Base URL: https://app.hiambrose.com
1. Agents
| Action | Method + Path |
|---|---|
| List | GET /api/agents |
| Get one | GET /api/agents/{slug} |
| Create | POST /api/agents |
| Update | PATCH /api/agents/{slug} |
| Delete | DELETE /api/agents/{slug} |
Create (immediate). slug + name required; everything else optional. Duplicate slug → 409.
curl -X POST https://app.hiambrose.com/api/agents \
-H "Authorization: Bearer YOUR_AGENCY_KEY" \
-H "Content-Type: application/json" \
-d '{
"slug": "sales-bot",
"name": "Sales Bot",
"stage": "draft",
"provider": "bedrock",
"model": "claude-haiku-4-5-20251001",
"allowed_spokes": ["transcription", "agent-vault", "skills-admin"],
"allowed_skills": ["gohighlevel"],
"attached_mcps": ["my-mcp-slug"],
"attached_teams": ["research"],
"description": "Handles inbound sales chats"
}'
Update — send only the fields you want to change:
curl -X PATCH https://app.hiambrose.com/api/agents/sales-bot \
-H "Authorization: Bearer YOUR_AGENCY_KEY" -H "Content-Type: application/json" \
-d '{ "stage": "live", "allowed_spokes": ["transcription", "ghl"] }'
Delete (also removes the agent's markdown files and sequences):
curl -X DELETE https://app.hiambrose.com/api/agents/sales-bot \
-H "Authorization: Bearer YOUR_AGENCY_KEY"
Get agent / team information: GET /api/agents/sales-bot returns name, slug, stage, tools, mode, files, and the composed system prompt.
2. Teams
Identical shape to agents (teams are simpler — no provider / model / allowed_skills / attached_mcps; those are agent-only and ignored for teams).
| Action | Method + Path |
|---|---|
| List | GET /api/teams |
| Get one | GET /api/teams/{slug} |
| Create | POST /api/teams |
| Update | PATCH /api/teams/{slug} |
| Delete | DELETE /api/teams/{slug} |
curl -X POST https://app.hiambrose.com/api/teams \
-H "Authorization: Bearer YOUR_AGENCY_KEY" -H "Content-Type: application/json" \
-d '{ "slug": "research", "name": "Research Team",
"allowed_spokes": ["transcription", "brain"], "description": "Deep research crew" }'
3. Markdown files (IDENTITY, PERSONALITY, CANONICAL, …)
Each agent/team has per-agency markdown files that drive its behavior, plus the config JSON (agent.json / team.json). Editing a file changes behavior immediately (hot-reload).
| Action | Method + Path |
|---|---|
| List files | GET /api/agents/{slug}/files |
| Read a file | GET /api/agents/{slug}/files/{filename} |
| Write / replace a file | PUT /api/agents/{slug}/files/{filename} |
| Generate one file (AI) | POST /api/agents/{slug}/generate-file |
| Generate all from a URL (AI) | POST /api/agents/{slug}/generate-all |
Writable filenames: any *.md (IDENTITY.md, PERSONALITY.md, MEMORY.md, NOTES.md, DESCRIPTION.md, BRAND.md, VOICE.md, FAQ.md, CANONICAL.md) or the config file agent.json / team.json. Swap /api/agents/ for /api/teams/ for teams.
curl -X PUT https://app.hiambrose.com/api/agents/sales-bot/files/IDENTITY.md \
-H "Authorization: Bearer YOUR_AGENCY_KEY" -H "Content-Type: application/json" \
-d '{ "content": "# Identity\nYou are Sales Bot, a friendly closer for Acme Insurance." }'
4. Sequences (scheduled cron jobs)
Per-agent/team scheduled prompts. Swap /api/agents/ for /api/teams/ for team sequences.
| Action | Method + Path |
|---|---|
| List | GET /api/agents/{slug}/cron-jobs |
| Add | POST /api/agents/{slug}/cron-jobs |
| Update | PUT /api/agents/{slug}/cron-jobs/{job_id} |
| Remove | DELETE /api/agents/{slug}/cron-jobs/{job_id} |
| Enable / disable | POST /api/agents/{slug}/cron-jobs/{job_id}/toggle |
| Run now | POST /api/agents/{slug}/cron-jobs/{job_id}/run |
| Run history | GET /api/agents/{slug}/cron-jobs/{job_id}/runs |
curl -X POST https://app.hiambrose.com/api/agents/sales-bot/cron-jobs \
-H "Authorization: Bearer YOUR_AGENCY_KEY" -H "Content-Type: application/json" \
-d '{ "name": "Monday recap", "schedule": "0 9 * * MON",
"timezone": "America/Chicago",
"prompt": "Summarize last week and list this week followups.",
"session_mode": "thread", "enabled": true }'
5. Tools you can select (spokes registry)
The list of every tool/spoke selectable in an agent/team's allowed_spokes:
curl https://app.hiambrose.com/api/spokes/registry \
-H "Authorization: Bearer YOUR_AGENCY_KEY"
Each entry's id is exactly what you put in allowed_spokes; tools lists the individual tool names. Entries like brain:fema are federated .gov data sources. One-click external MCP templates: GET /api/mcp/catalog.
6. Skills
| Action | Method + Path |
|---|---|
| List all available (system + custom) | GET /api/skills/available |
| List your custom skills | GET /api/users/{user_id}/skills |
| Get one | GET /api/users/{user_id}/skills/{slug} |
| Add / update | POST /api/users/{user_id}/skills |
| Generate (AI-authored) | POST /api/users/{user_id}/skills/generate |
| Remove | DELETE /api/users/{user_id}/skills/{slug} |
To let an agent use skills, add their slugs to its allowed_skills. To let an agent/team manage skills over MCP, give it the skills-admin capability in allowed_spokes.
curl -X POST https://app.hiambrose.com/api/users/USER_ID/skills \
-H "Authorization: Bearer YOUR_AGENCY_KEY" -H "Content-Type: application/json" \
-d '{ "slug": "objection-handling",
"content": "---\nname: objection-handling\ndescription: Handle objections\n---\n\n# Objection Handling\n..." }'
7. MCP servers
| Action | Method + Path |
|---|---|
| List | GET /api/users/{user_id}/mcps |
| Add (auto-discovers tools) | POST /api/users/{user_id}/mcps |
| Refresh tool discovery | POST /api/users/{user_id}/mcps/{slug}/refresh |
| Set per-tool permissions | PATCH /api/users/{user_id}/mcps/{slug}/permissions |
| Remove | DELETE /api/users/{user_id}/mcps/{slug} |
curl -X POST https://app.hiambrose.com/api/users/USER_ID/mcps \
-H "Authorization: Bearer YOUR_AGENCY_KEY" -H "Content-Type: application/json" \
-d '{ "slug": "notion", "label": "Notion", "transport": "http",
"url": "https://mcp.example.com/notion",
"headers": { "Authorization": "Bearer ..." } }'
Attach an MCP to an agent via attached_mcps, or to any agent/team over the node /mcp endpoint by adding mcp:<slug> to allowed_spokes.
8. Claude Routines
| Action | Method + Path |
|---|---|
| List | GET /api/claude-routines |
| Add / upsert | POST /api/claude-routines |
| Update | PUT /api/claude-routines/{slug} |
| Remove | DELETE /api/claude-routines/{slug} |
| Test fire | POST /api/claude-routines/{slug}/test |
curl -X POST https://app.hiambrose.com/api/claude-routines \
-H "Authorization: Bearer YOUR_AGENCY_KEY" -H "Content-Type: application/json" \
-d '{ "name": "Nightly report", "routine": "ROUTINE_ID_OR_URL",
"token": "ROUTINE_BEARER", "enabled": true }'
9. Logs (AI call logs)
| Action | Method + Path |
|---|---|
| List recent calls | GET /api/llm-calls |
| Aggregate summary | GET /api/llm-calls/summary |
| One call (full prompt+response) | GET /api/llm-calls/{call_id} |
Filters (query params): agent_id, team_id, workload_tag, user_id, session_id, search, since_hours, success_only, limit, offset.
curl "https://app.hiambrose.com/api/llm-calls?agent_id=sales-bot&since_hours=24&limit=100" \
-H "Authorization: Bearer YOUR_AGENCY_KEY"
Each row records the provider (bedrock / anthropic), tokens, model, and cost. Bedrock calls are billed to your credits; calls made with your own Anthropic API key are logged but not billed.
POST /api/agents · POST /api/teams. Edit a persona file → PUT /api/agents/{slug}/files/{file}.md. Sequences → /api/agents/{slug}/cron-jobs. All tools → GET /api/spokes/registry. All skills → GET /api/skills/available. MCPs → /api/users/{user_id}/mcps. Routines → /api/claude-routines. Logs → /api/llm-calls.