Public pages
Build public chat and MCP over a published documentation corpus.
These examples combine published pages, explicit retrieval tools, and selected public runtime routes.
| Example | Purpose |
|---|---|
| Page-backed chat and MCP | Publish a corpus, answer from it, and trigger protected refreshes. |
| Read-only page commands | Explore the same namespace with bounded commands. |
| Public team | Expose one team without exposing its members’ routes. |
Setup
Clone the cookbook examples and install their dependencies in a separate environment:
git clone https://github.com/agno-agi/agno.git
cd agno
git checkout 8f36eaf2d18e91afa7b327eec66a3cd3685dcb87
uv venv .venv-pages
source .venv-pages/bin/activate
uv pip install -U 'agno[os,mcp,pages,openai]'
export OPENAI_API_KEY="your-openai-api-key"Use a separate local PostgreSQL database with pgvector, not an existing production database. If you do not already have local Postgres, the cookbook helper starts it on port 5532:
./cookbook/scripts/run_pgvector.sh
# Wait until the database is accepting connections.
docker exec pgvector pg_isready -U ai
# Create this database once.
docker exec pgvector createdb -U ai page_demo
export PAGE_DEMO_DB_URL="postgresql+psycopg://ai:ai@localhost:5532/page_demo"For another local Postgres instance, create page_demo there and set its direct connection URL instead. The database user needs permission to create the vector extension, tables, and indexes. Keep all three cookbook files together: the filesystem example imports public_pages.py.
For the production application pattern, see How we built our docs agent.