ajshedivy/agno-cookbook/agentos-api-sessions
Claude Code and agent skill by ajshedivy/agno-cookbook
- community
Checking that the SKILL.md file is still in the repository.
Interact with AgentOS Session API endpoints. For standard operations (listing, creating, renaming, deleting sessions, viewing runs), use the provided CLI script first. Only write custom Python when the script cannot handle the use case (e.g., persistent conversations, clearing history, bulk deletion, advanced filtering). Trigger when: managing sessions remotely, inspecting session history, creating session tests, or asking things like "find me all sessions from the researcher agent" or "get the latest runs from session X."
Install
npx vskill@latest install ajshedivy/agno-cookbook/agentos-api-sessionsSKILL.md
The same SKILL.md was published earlier as ajshedivy/agno-cookbook/agentos-api-sessions.
AgentOS Sessions API
Use agno.client.AgentOSClient to create, list, inspect, rename, and delete sessions on a remote AgentOS instance. Sessions maintain conversation history and context across runs.
Prerequisites
Start an AgentOS server with storage configured:
Default: Use the CLI Script
Always try the provided script first. It covers listing sessions, creating sessions, inspecting session details, viewing runs, renaming, and deleting — all from the command line with no custom code needed.
The script is at: scripts/manage_sessions.py
List all sessions
List sessions for a specific agent
List sessions for a specific user
Inspect a session
Show runs inside a session
Create a new session
Rename a session
Delete a session
Full CLI reference
When to Write Custom Python
Only write ad-hoc Python when the CLI script cannot handle your use case:
- Persistent conversations (running an agent within a session across multiple messages)
- Clearing session history while keeping the session intact
- Bulk deletion of multiple sessions at once
- Advanced filtering (by type, session name, sorting, pagination)
- Updating session metadata (PATCH endpoint)
- Fetching a specific run by run ID
- Custom error handling or retry logic
- Integration tests that assert on session or run content
API Endpoints
| Method | Path | Description | |
|---|---|---|---|
| GET | /sessions | List sessions (paginated, filterable) | |
| GET | /sessions/{session_id} | Get session by ID | |
| GET | /sessions/{session_id}/runs | Get session runs | |
| GET | /sessions/{session_id}/runs/{run_id} | Get specific run | |
| POST | /sessions | Create new session | |
| PATCH | /sessions/{session_id} | Update session | |
| POST | /sessions/{session_id}/rename | Rename session | |
| DELETE | /sessions/{session_id} | Delete session | |
| POST | /sessions/{session_id}/clear | Clear session history | |
| DELETE | /sessions | Delete multiple sessions |
Custom Python Examples
Use Sessions for Persistent Conversations
Clear Session History
Erase all conversation history while keeping the session:
Advanced Filtering
The list endpoint supports filtering beyond what the CLI provides:
Anti-Patterns
- Don't write custom Python for basic operations — use the CLI script for listing, creating, inspecting, renaming, and deleting sessions
- Don't forget `db=` on agents — without storage, sessions don't persist between API calls
- Don't create sessions for every request — use the same
session_idfor continuous conversations - Don't forget `add_history_to_context=True` — without it, agents won't recall prior messages
- Don't ignore pagination — use
limitandpagewhen listing many sessions
Further Reading
For advanced session management patterns, read references/api-patterns.md.
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingplugins/agno-agentos-api/skills/agentos-api-sessions/SKILL.md
Popularity
- Repository stars
- 4
- 7-day trend score
- 0
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/ajshedivy/agno-cookbook/agentos-api-sessions)