From agno-agentos-api
Interact with AgentOS Agent API endpoints. For standard operations (listing agents, running agents, streaming), use the provided CLI script first. Only write custom Python when the script cannot handle the use case (e.g., structured output, dependencies, cancellation, chaining multiple calls). Trigger when: running agents remotely, listing agents, creating agent tests, or asking things like "kick off a run in my test agent" or "what agents do I have configured?"
How this skill is triggered — by the user, by Claude, or both
Slash command
/agno-agentos-api:agentos-api-agentsThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Start an AgentOS server first:
Start an AgentOS server first:
export ANTHROPIC_API_KEY=sk-...
uv run start_agentos.py # See agno-agentos skill
Always try the provided script first. It covers listing agents, running agents (streaming and non-streaming), session persistence, and dependencies — all from the command line with no custom code needed.
The script is at: scripts/run_agents.py
uv run scripts/run_agents.py --base-url http://localhost:8000
uv run scripts/run_agents.py --base-url http://localhost:8000 --config
uv run scripts/run_agents.py --base-url http://localhost:8000 --config --agent-id my-agent
uv run scripts/run_agents.py --base-url http://localhost:8000 \
--agent-id my-agent \
-m "What is 2 + 2?"
uv run scripts/run_agents.py --base-url http://localhost:8000 \
--agent-id my-agent \
-m "Tell me a joke" --stream
uv run scripts/run_agents.py --base-url http://localhost:8000 \
--agent-id my-agent \
-m "My name is Alice" --session-id chat-1 --user-id alice
uv run scripts/run_agents.py --base-url http://localhost:8000 \
--agent-id my-agent \
-m "What is my name?" --session-id chat-1 --user-id alice
uv run scripts/run_agents.py --base-url http://localhost:8000 \
--agent-id my-agent \
-m "Greet me" --dependencies '{"robot_name": "Anna"}'
uv run scripts/run_agents.py --help
Only write ad-hoc Python when the CLI script cannot handle your use case:
--config shows| Method | Path | Description |
|---|---|---|
| GET | /agents | List all agents |
| GET | /agents/{agent_id} | Get agent details |
| POST | /agents/{agent_id}/runs | Create agent run |
| POST | /agents/{agent_id}/cancel_run | Cancel agent run |
| POST | /agents/{agent_id}/continue_run | Continue agent run (resume with tool results) |
import asyncio
from agno.client import AgentOSClient
async def main():
client = AgentOSClient(base_url="http://localhost:7777")
agent = await client.aget_agent("my-agent-id")
print(f"Name: {agent.name}")
print(f"Model: {agent.model}")
print(f"Tools: {len(agent.tools or [])}")
print(f"Knowledge: {agent.knowledge}")
print(f"Memory: {agent.memory}")
asyncio.run(main())
import asyncio, json
from agno.client import AgentOSClient
async def main():
client = AgentOSClient(base_url="http://localhost:7777")
output_schema = {
"type": "object",
"properties": {
"answer": {"type": "string"},
"confidence": {"type": "number"},
},
"required": ["answer", "confidence"],
}
result = await client.run_agent(
agent_id="my-agent",
message="What is the capital of France?",
output_schema=json.dumps(output_schema),
)
print(result.content)
asyncio.run(main())
await client.cancel_agent_run(agent_id=agent_id)
Resume a paused execution (e.g., after human-in-the-loop tool approval):
await client.continue_agent_run(agent_id=agent_id)
When the AgentOS instance has a security key configured:
result = await client.run_agent(
agent_id=agent_id,
message="Hello",
headers={"Authorization": "Bearer your-jwt-token"},
)
from agno.client import AgentOSClient, RemoteServerUnavailableError
try:
client = AgentOSClient(base_url="http://localhost:7777")
config = await client.aget_config()
except RemoteServerUnavailableError as e:
print(f"Server unavailable: {e.message}")
print(f"URL: {e.base_url}")
await — all client methods are asyncaget_config() or the CLI scriptaget_config() first to verify agents existRunContentEvent and RunCompletedEventFor advanced agent API patterns, read references/api-patterns.md.
npx claudepluginhub ajshedivy/agno-cookbook --plugin agno-agentos-apiGuides creation and configuration of autonomous agents for Claude Code plugins, covering frontmatter, triggering descriptions, system prompts, tools, teams, permissions, and best practices.
Discovers and communicates with active AI agents (Codex, Claude Code) using ai-devkit agent list, detail, and send commands. Useful for inter-agent coordination.
Manages agent fleets via CRUD (create, command, monitor, delete) and lifecycle patterns. For multi-agent systems, resource cleanup, and state tracking with Claude Agent SDK.