Skip to main content
WorkspaceContextProvider wraps a project directory and gives the agent a single query_<id> tool. The tool routes through a read-only sub-agent that has the Workspace toolkit scoped to the root: list files, search content, and read files with line numbers.
workspace.py

Run the Example

1

Set up your virtual environment

2

Install dependencies

3

Export your OpenAI API key

4

Clone Agno

Clone the repository and run the remaining commands from its root:
5

Run the example

Run the example from the repository root:
Full source: cookbook/12_context/13_workspace.py