> ## Documentation Index
> Fetch the complete documentation index at: https://dev.haico.gr/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Reading the workspace

> Fetch the objective, document, and plan that the agent and the user co-constructed.

The workspace is the shared state a turn operates on. After a turn completes, read it back with the
`thread_id` from the `conversation_info` event.

```bash theme={null}
export THREAD_ID="..."   # from the conversation_info event

# The co-constructed document
curl -s "https://haico.gr/api/workspace/$THREAD_ID/document" \
  -H "Authorization: Bearer $HAICO_TOKEN"

# The agent's evolving understanding of the goal
curl -s "https://haico.gr/api/workspace/$THREAD_ID/objective" \
  -H "Authorization: Bearer $HAICO_TOKEN"

# The hierarchical plan
curl -s "https://haico.gr/api/workspace/$THREAD_ID/todos" \
  -H "Authorization: Bearer $HAICO_TOKEN"
```

The persistent data model behind these routes is described in
[database-schema.md](/docs/database-schema).

<Note>
  `document` and `objective` return **JSON `null` with HTTP 200** until the agent has written
  one, which distinguishes "not written yet" from "written but empty". A turn the agent answers
  conversationally, without editing the artifact, leaves them null. Check before subscripting.
</Note>

<Card title="See it in a full loop" icon="code" href="/docs/api-guide/recipes">
  A Python example that runs two turns and reads the document back afterwards.
</Card>
