Advanced
AI Workforce
Hire and orchestrate AI workers for recurring work
The AI Workforce lets you hire agents to do ongoing work — not one‑off runs, but persistent roles with schedules, tools, and budgets. Think of it as staffing a team of specialized agents.
Concepts
| Concept | Meaning |
|---|---|
| Worker | An instance of a published agent hired for a role |
| Role | The job description: goal, tools, schedule, budget |
| Run | A single execution of a worker |
| Budget | A spend cap (credits) that stops a worker before overspend |
Hire a worker
curl -X POST https://api.theaimart.co/api/v1/workforce/workers \
-H "Authorization: Bearer $THEAIMART_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"agent_id": "agent_789",
"role": "Daily support triage",
"schedule": "0 8 * * *",
"budget": { "credits": 5000, "period": "monthly" },
"config": { "inbox": "support@yourco.com" }
}'
Orchestration
Workers can hand off to one another. A triage worker can route to a specialist worker; a specialist can escalate to a human. For tightly coupled, parallel work, compose them into an Agent Swarm instead.
Always set a budget. A worker without a spend cap can run up usage on a schedule. Budgets pause the worker and notify you when hit.
Observability
Every run logs inputs, tool calls, outputs, and cost. Review them under Workforce → Runs, or pull them via API to feed your own dashboards. Watch cost per outcome, not just cost per run.
When to use what
- •One‑off task → invoke the agent directly.
- •Recurring role → hire a Worker.
- •Coordinated multi‑agent task → build a Swarm.