# AgentOS session reads name the SDK behind each external agent

> Agno AgentOS adds metadata.sdk ("codex" or "claude-agent-sdk") to GET /sessions, GET /sessions/{session_id} and the session run reads, so a client can tell CodexAgent and ClaudeAgent sessions from native ones.

- Published: 2026-10-12
- Author: Kaustubh Shukla
- Categories: Changelog
- Canonical: https://www.agno.com/blog/agentos-session-reads-name-the-sdk-behind-each-external-agent
- Markdown: https://www.agno.com/blog/agentos-session-reads-name-the-sdk-behind-each-external-agent.md

AgentOS takes `metadata.sdk` from `agent_data.sdk`, which Agno's `BaseExternalAgent` already writes on every session it creates, and lays it over the response when you read the session. Nothing new is stored. Sessions from earlier releases get the label with no migration, records that still use the older `agent_data.framework` key are read too, and the metadata in your database stays exactly as you saved it.

![Real output from GET /sessions and GET /sessions/codex-session/runs for a CodexAgent session and a native session, with the Codex SDK stubbed. Before, the Codex session's metadata was an empty object, the native session's was null and runs had no metadata field. Now the Codex session and its run both carry sdk set to codex, and the native session's metadata is still null.](https://www.agno.com/images/v3-1-3-session-sdk-metadata.png)

Runs don't record their SDK, so the run reads take it from the parent session, and `RunSchema` gains a `metadata` field to carry it. That field also returns what the run stored, such as the attempt count of a retried run.

```text
# real output: each run's metadata from GET /sessions/claude-session/runs, after a ClaudeAgent run that retried once (stand-in Claude SDK)
[{"attempts": 2, "sdk": "claude-agent-sdk"}]
```

Native agent sessions get no `sdk` key, and team and workflow sessions return their metadata as before. If you stored your own `metadata["sdk"]` on an external agent's session, the response shows the adapter's value and your stored value stays in the database. `GET /agents/{agent_id}/runs` does not carry the label yet.

See the [cookbook](https://github.com/agno-agi/agno/blob/main/cookbook/frameworks/README.md), and learn more about [identifying the harness and model](https://docs.agno.com/agent-os/multi-framework/observability#identify-the-harness-and-model) in the documentation.
