Skip to main content
Trace an AgentOS knowledge agent. Its pinned media instruction branches require migration before use.
This example tells the agent to call text_to_speech and create_image, but registers neither tool.
03_agent_with_knowledge_tracing.py

Run the Example

1

Set up your virtual environment

2

Install dependencies

3

Export your OpenAI API key

4

Run PgVector

5

Remove the media instructions

Delete the Explain important concepts using audio and Explain concepts with images branches from instructions. Remove and optional audio explanations for complex concepts from description before running.
6

Run the example

Save the code above as 03_agent_with_knowledge_tracing.py, then run:
Full source: cookbook/05_agent_os/tracing/03_agent_with_knowledge_tracing.py