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

ActionMethod + Path
ListGET /api/agents
Get oneGET /api/agents/{slug}
CreatePOST /api/agents
UpdatePATCH /api/agents/{slug}
DeleteDELETE /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).

ActionMethod + Path
ListGET /api/teams
Get oneGET /api/teams/{slug}
CreatePOST /api/teams
UpdatePATCH /api/teams/{slug}
DeleteDELETE /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).

ActionMethod + Path
List filesGET /api/agents/{slug}/files
Read a fileGET /api/agents/{slug}/files/{filename}
Write / replace a filePUT /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.

ActionMethod + Path
ListGET /api/agents/{slug}/cron-jobs
AddPOST /api/agents/{slug}/cron-jobs
UpdatePUT /api/agents/{slug}/cron-jobs/{job_id}
RemoveDELETE /api/agents/{slug}/cron-jobs/{job_id}
Enable / disablePOST /api/agents/{slug}/cron-jobs/{job_id}/toggle
Run nowPOST /api/agents/{slug}/cron-jobs/{job_id}/run
Run historyGET /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

ActionMethod + Path
List all available (system + custom)GET /api/skills/available
List your custom skillsGET /api/users/{user_id}/skills
Get oneGET /api/users/{user_id}/skills/{slug}
Add / updatePOST /api/users/{user_id}/skills
Generate (AI-authored)POST /api/users/{user_id}/skills/generate
RemoveDELETE /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

ActionMethod + Path
ListGET /api/users/{user_id}/mcps
Add (auto-discovers tools)POST /api/users/{user_id}/mcps
Refresh tool discoveryPOST /api/users/{user_id}/mcps/{slug}/refresh
Set per-tool permissionsPATCH /api/users/{user_id}/mcps/{slug}/permissions
RemoveDELETE /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

ActionMethod + Path
ListGET /api/claude-routines
Add / upsertPOST /api/claude-routines
UpdatePUT /api/claude-routines/{slug}
RemoveDELETE /api/claude-routines/{slug}
Test firePOST /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)

ActionMethod + Path
List recent callsGET /api/llm-calls
Aggregate summaryGET /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.

Quick map: Add agent/team → 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.