Skip to main content

register()

Register the current agent with MeshAI. Must be called before start_heartbeat() or track_usage().
agent = client.register(
    framework="crewai",
    model_provider="openai",
    model_name="gpt-4o",
    description="Summarizes customer support tickets",
    team="support-team",
    tags={"env": "production", "version": "1.2.0"},
)
framework
string
required
Agent framework: crewai, langchain, autogen, openai, anthropic, custom
model_provider
string
LLM provider: openai, anthropic, google, nvidia, bedrock
model_name
string
Model identifier (e.g., gpt-4o, claude-sonnet-4-20250514)
description
string
Human-readable description of what the agent does
team
string
Team or project that owns this agent (used for cost attribution)
tags
dict
Key-value metadata tags
Returns: Agent object with id, name, status, and all metadata.

list_agents()

List all agents in your tenant.
agents = client.list_agents(
    status="healthy",
    framework="crewai",
    limit=50,
    offset=0,
)
status
string
Filter by status: healthy, degraded, down, unknown
framework
string
Filter by framework
team
string
Filter by team
limit
integer
default:"20"
Number of results per page
offset
integer
default:"0"
Number of results to skip
Returns: List of agent objects with pagination metadata.

get_agent()

Get a single agent by ID.
agent = client.get_agent("agt_abc123")
agent_id
string
required
Agent ID
Returns: Agent object.
{
  "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"
}

update_agent()

Update an agent’s metadata.
updated = client.update_agent(
    "agt_abc123",
    description="Summarizes and categorizes support tickets",
    model_name="gpt-4o-mini",
    tags={"version": "1.3.0"},
)
agent_id
string
required
Agent ID
description
string
Updated description
model_provider
string
Updated model provider
model_name
string
Updated model name
team
string
Updated team
tags
dict
Updated tags (merges with existing)
Returns: Updated agent object.

delete_agent()

Delete an agent. The agent is removed from the active registry but remains in the audit trail.
client.delete_agent("agt_abc123")
agent_id
string
required
Agent ID
Returns: Confirmation object.
Deleting an agent is irreversible. The agent’s historical data (cost, anomalies, audit events) is preserved but the agent can no longer send heartbeats or telemetry.