provider agent_platformagent_applications GET
/api/projects/{project_id}/agent_applications/{id}/sessions/{session_id}/ @utdk/posthog
/api/projects/{project_id}/agent_applications/{id}/sessions/{session_id}/ agent_applications_sessions_retrieve
Fetch one session's state — full conversation by default, or just
the trailing N messages with `?last_n=`. Always returns a
`usage_total` block aggregated over the entire session, regardless of
trim. The runner-side queue DB is the source of truth.
- id path required
- A UUID string identifying this agent application.
- string
- last_n query
- If set, return only the most recent N messages from the conversation. `usage_total` is still computed over the full session — only the transcript is trimmed. The response includes `conversation_trimmed: true` and `conversation_total_turns` so the caller knows how much was hidden.
- integer
- project_id path required
- Project ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/.
- string
- session_id path required
- UUID of the session to fetch (must belong to this application).
- string
Try it
Authentication
Configure credentials for PostHog API
Code snippet
Updates live as you fill in the form above.
TypeScript
import posthog from '@utdk/posthog';
await posthog.agentApplicationsSessionsRetrieve()