Files
webber/src/domains/router.py
T
jpmschweitzerandClaude Opus 4.5 f4e8552298 feat: add Explore agent with PydanticAI tool calling
Implements the first Claude-like agent for codebase exploration:

Core Features:
- Explore agent with glob, grep, read, and bash tools
- Native PydanticAI tool calling with Ollama/Mistral Nemo
- Sanitized Ollama provider (fixes content:null issue)
- REST API endpoints for agent execution

Tool Infrastructure:
- BaseTool abstract class with ToolResult dataclass
- ReadFileTool, GlobFilesTool, GrepContentTool, BashReadOnlyTool
- Path validation and sandboxing support

CLI Client (separate package for future extraction):
- webber-cli command with chat, explore, status commands
- Communicates with Webber API backend
- Rich console output with theming

Configuration:
- Dev server on port 8095 (production uses 8086)
- Mistral Nemo optimizations (temp 0.3, tool_choice required)

Tests: 24 tests covering tools and API endpoints

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-10 01:26:30 +01:00

28 lines
780 B
Python

"""
Root router - composes all domain routers.
Import and include domain routers here.
main.py only includes this root_router.
"""
from fastapi import APIRouter
from src.domains.health.router import router as health_router
from src.domains.agents.router import router as agents_router
# from src.domains.auth.router import router as auth_router
# from src.domains.tools.router import router as tools_router
root_router = APIRouter()
# Health (no prefix - root level)
root_router.include_router(health_router)
# Agents domain (prefix defined in router)
root_router.include_router(agents_router)
# Auth domain
# root_router.include_router(auth_router, prefix="/auth", tags=["Auth"])
# Tools domain
# root_router.include_router(tools_router, prefix="/tools", tags=["Tools"])