readme
All checks were successful
Build and Push Agent Docker Image / build (push) Successful in 2m26s

This commit is contained in:
2025-12-14 18:38:07 +01:00
parent 8b73a7dbd1
commit 7e8e07c1fd
2 changed files with 21 additions and 6 deletions

View File

@@ -8,6 +8,7 @@
``` ```
+------------------+ +------------------+
| Auth0 | | Auth0 |
| (RBAC roles) |
+--------+---------+ +--------+---------+
| |
v v
@@ -18,18 +19,22 @@
+------------------+ | - Auth0 SSO | +------------------+ | - Auth0 SSO |
+----------+----------+ +----------+----------+
| |
| AG-UI Protocol
v v
+----------+----------+ +----------+----------+
| web/agent/ | | web/agent/ |
| (LangGraph) | | (PydanticAI) |
| - Google Gemini | | - Google Gemini |
| - x-user-roles |
+----------+----------+ +----------+----------+
| |
| Streamable HTTP
v v
+----------+----------+ +----------+----------+
| mcp/ | | mcp/ |
| (FastMCP Server) | | (FastMCP Server) |
| - Semantic search | | - Semantic search |
| - Role filtering |
+----------+----------+ +----------+----------+
| |
+--------------------+--------------------+ +--------------------+--------------------+
@@ -65,8 +70,8 @@
| Component | Description | Tech Stack | | Component | Description | Tech Stack |
|-----------|-------------|------------| |-----------|-------------|------------|
| **web/** | Frontend application with chat UI | Next.js, CopilotKit, Auth0 | | **web/** | Frontend application with chat UI | Next.js, CopilotKit, Auth0 |
| **web/agent/** | AI agent for answering cave questions | LangGraph, Google Gemini | | **web/agent/** | AI agent for answering cave questions | PydanticAI, AG-UI, Google Gemini |
| **mcp/** | MCP server exposing semantic search tools | FastMCP, Cohere | | **mcp/** | MCP server exposing semantic search tools | FastMCP, Starlette, Cohere |
| **poller/** | Document ingestion and processing pipeline | Python, Claude API, Cohere | | **poller/** | Document ingestion and processing pipeline | Python, Claude API, Cohere |
## Data Flow ## Data Flow
@@ -80,9 +85,11 @@
- Stored in PostgreSQL with pgvector - Stored in PostgreSQL with pgvector
2. **Search & Chat** (mcp + agent) 2. **Search & Chat** (mcp + agent)
- User authenticates via Auth0 (roles assigned)
- User asks question via web UI - User asks question via web UI
- Agent calls MCP tools for semantic search - Web API extracts user roles from session, passes to agent
- MCP queries pgvector for relevant documents - Agent creates MCP connection with `x-user-roles` header
- MCP queries pgvector, filtering by user's roles
- Agent synthesizes response with citations - Agent synthesizes response with citations
## Getting Started ## Getting Started
@@ -95,6 +102,13 @@ See individual component READMEs:
Each component requires its own environment variables. See the respective READMEs for details. Each component requires its own environment variables. See the respective READMEs for details.
| Component | Key Variables |
|-----------|---------------|
| **web/** | `AUTH0_*`, `AGENT_URL` |
| **web/agent/** | `GOOGLE_API_KEY`, `CAVE_MCP_URL` |
| **mcp/** | `COHERE_API_KEY`, `DB_*` |
| **poller/** | `ANTHROPIC_API_KEY`, `COHERE_API_KEY`, `AWS_*`, `DB_*` |
**Never commit `.env` files** - they are gitignored. **Never commit `.env` files** - they are gitignored.
## CI/CD ## CI/CD
@@ -106,6 +120,7 @@ Gitea Actions workflows build and push Docker images on changes to `main`:
| build-push-web | `web/**` (excluding agent) | `cavepediav2-web:latest` | | build-push-web | `web/**` (excluding agent) | `cavepediav2-web:latest` |
| build-push-agent | `web/agent/**` | `cavepediav2-agent:latest` | | build-push-agent | `web/agent/**` | `cavepediav2-agent:latest` |
| build-push-poller | `poller/**` | `cavepediav2-poller:latest` | | build-push-poller | `poller/**` | `cavepediav2-poller:latest` |
| build-push-mcp | `mcp/**` | `cavepediav2-mcp:latest` |
## License ## License

View File

@@ -75,7 +75,7 @@ def create_agent(user_roles: list[str] | None = None):
logger.info("MCP server unavailable - running without MCP tools") logger.info("MCP server unavailable - running without MCP tools")
return Agent( return Agent(
model=GoogleModel("gemini-3-pro-preview"), model=GoogleModel("gemini-2.5-pro"),
toolsets=toolsets if toolsets else None, toolsets=toolsets if toolsets else None,
instructions=AGENT_INSTRUCTIONS, instructions=AGENT_INSTRUCTIONS,
) )