Skip to main content

List Agents

GET /agents
Query parameters:
ParameterTypeDescription
statusstringFilter: healthy, degraded, down, unknown
frameworkstringFilter by framework
teamstringFilter by team
environmentstringFilter: production, staging, dev
pageintegerPage number (default: 1)
limitintegerResults per page (default: 20, max: 100)
curl "https://api.meshai.dev/agents?status=healthy&limit=50" \
  -H "Authorization: Bearer msh_YOUR_API_KEY"
{
  "success": true,
  "data": [
    {
      "id": "agt_abc123",
      "name": "production-summarizer",
      "description": "Summarizes customer support tickets",
      "framework": "crewai",
      "model_provider": "openai",
      "model_name": "gpt-4o",
      "environment": "production",
      "status": "healthy",
      "team": "support-team",
      "risk_level": "limited",
      "last_heartbeat": "2026-03-17T10:30:00Z",
      "created_at": "2026-03-01T08:00:00Z"
    }
  ],
  "meta": { "total": 12, "page": 1, "limit": 50 }
}

Register an Agent

POST /agents
curl -X POST https://api.meshai.dev/agents \
  -H "Authorization: Bearer msh_YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "production-summarizer",
    "description": "Summarizes customer support tickets",
    "framework": "crewai",
    "model_provider": "openai",
    "model_name": "gpt-4o",
    "environment": "production",
    "team": "support-team",
    "tags": {"version": "1.2.0"}
  }'
{
  "success": true,
  "data": {
    "id": "agt_abc123",
    "name": "production-summarizer",
    "description": "Summarizes customer support tickets",
    "framework": "crewai",
    "model_provider": "openai",
    "model_name": "gpt-4o",
    "environment": "production",
    "status": "unknown",
    "team": "support-team",
    "tags": {"version": "1.2.0"},
    "created_at": "2026-03-17T10:00:00Z"
  }
}

Get an Agent

GET /agents/{agent_id}
curl https://api.meshai.dev/agents/agt_abc123 \
  -H "Authorization: Bearer msh_YOUR_API_KEY"

Update an Agent

PATCH /agents/{agent_id}
curl -X PATCH https://api.meshai.dev/agents/agt_abc123 \
  -H "Authorization: Bearer msh_YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "description": "Summarizes and categorizes support tickets",
    "model_name": "gpt-4o-mini",
    "tags": {"version": "1.3.0"}
  }'

Delete an Agent

DELETE /agents/{agent_id}
curl -X DELETE https://api.meshai.dev/agents/agt_abc123 \
  -H "Authorization: Bearer msh_YOUR_API_KEY"
Returns 204 No Content on success. The agent’s historical data is preserved in the audit trail.

Teams

List Teams

GET /teams
curl https://api.meshai.dev/teams \
  -H "Authorization: Bearer msh_YOUR_API_KEY"
{
  "success": true,
  "data": [
    {
      "id": "team_abc123",
      "name": "support-team",
      "agent_count": 5,
      "monthly_cost_usd": 456.78,
      "created_at": "2026-02-15T08:00:00Z"
    },
    {
      "id": "team_def456",
      "name": "sales-team",
      "agent_count": 3,
      "monthly_cost_usd": 312.45,
      "created_at": "2026-02-20T08:00:00Z"
    }
  ]
}

Create a Team

POST /teams
curl -X POST https://api.meshai.dev/teams \
  -H "Authorization: Bearer msh_YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "engineering-team",
    "description": "Internal engineering AI agents"
  }'