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

Run the example

Clone Agno and run the example from the repository root:
Full source: cookbook/12_context/13_workspace.py