Phase 1 — Foundation
Scaffold the Knowledge Agent as a Hub agent with dual-layer Tavily integration (connector for auth + Python SDK for runtime).
Agent class
```python
class KnowledgeAgent(Agent):
name = "knowledge"
description = "Build local knowledge bases from web + local docs, query with local LLM"
default_model = "Qwen3.5-35B-A3B-GGUF"
REQUIRED_CONNECTORS = [
ConnectorRequirement(
connector_id="tavily",
scopes=[],
reason="Crawl websites and search the web for your knowledge base.",
),
]
```
Package structure
```
hub/agents/python/knowledge/
├── gaia-agent.yaml # connectors: [{id: tavily}]
├── pyproject.toml # amd-gaia + tavily-python
├── gaia_agent_knowledge/
│ ├── agent.py # KnowledgeAgent with REQUIRED_CONNECTORS
│ ├── cli.py # gaia-knowledge index|ask|search|...
│ ├── tavily_client.py # Reads key from keyring, wraps Python SDK
│ ├── crawler.py # TavilyClient.crawl → markdown files
│ ├── indexer.py # Markdown → RAG index
│ ├── knowledge_base.py # KB lifecycle management
│ ├── search.py # TavilyClient.search + cache
│ ├── cache.py # SQLite result cache
│ ├── credits.py # Credit tracking
│ ├── config.py # Preferences
│ ├── planner.py # Agent: research planning
│ ├── synthesizer.py # Agent: cross-source synthesis
│ └── tools/ # @tool wrappers for agent's MCP server
├── tests/
└── README.md
```
Deliverables
Plan: `docs/plans/knowledge-agent.mdx` § "Packaging & Distribution"
Phase 1 — Foundation
Scaffold the Knowledge Agent as a Hub agent with dual-layer Tavily integration (connector for auth + Python SDK for runtime).
Agent class
```python
class KnowledgeAgent(Agent):
name = "knowledge"
description = "Build local knowledge bases from web + local docs, query with local LLM"
default_model = "Qwen3.5-35B-A3B-GGUF"
```
Package structure
```
hub/agents/python/knowledge/
├── gaia-agent.yaml # connectors: [{id: tavily}]
├── pyproject.toml # amd-gaia + tavily-python
├── gaia_agent_knowledge/
│ ├── agent.py # KnowledgeAgent with REQUIRED_CONNECTORS
│ ├── cli.py # gaia-knowledge index|ask|search|...
│ ├── tavily_client.py # Reads key from keyring, wraps Python SDK
│ ├── crawler.py # TavilyClient.crawl → markdown files
│ ├── indexer.py # Markdown → RAG index
│ ├── knowledge_base.py # KB lifecycle management
│ ├── search.py # TavilyClient.search + cache
│ ├── cache.py # SQLite result cache
│ ├── credits.py # Credit tracking
│ ├── config.py # Preferences
│ ├── planner.py # Agent: research planning
│ ├── synthesizer.py # Agent: cross-source synthesis
│ └── tools/ # @tool wrappers for agent's MCP server
├── tests/
└── README.md
```
Deliverables
Plan: `docs/plans/knowledge-agent.mdx` § "Packaging & Distribution"