Last Updated: 2025-10-11
This document provides a comprehensive overview of the project's file organization.
/home/rodrigo/agentic/
├── backend/ # Python FastAPI backend
│ ├── main.py # FastAPI application entry point
│ ├── requirements.txt # Python dependencies
│ ├── run.sh # Backend startup script
│ ├── .env # Environment variables (API keys, etc.)
│ │
│ ├── config/ # Configuration & data models
│ │ ├── __init__.py
│ │ ├── schemas.py # Pydantic models for validation
│ │ └── config_loader.py # Load agents/tools from disk
│ │
│ ├── utils/ # Utility modules
│ │ ├── __init__.py
│ │ ├── context.py # Agent context management
│ │ └── voice_conversation_store.py # SQLite voice storage
│ │
│ ├── core/ # Core agent framework
│ │ ├── __init__.py
│ │ ├── agent_factory.py # Create agents from configs
│ │ ├── runner.py # Execute agents via WebSocket
│ │ ├── looping_agent.py # Single agent with tool loop
│ │ ├── looping_code_executor_agent.py # Agent with code execution
│ │ ├── multimodal_tools_looping_agent.py # Vision-capable agent
│ │ └── nested_agent.py # Multi-agent coordinator
│ │
│ ├── api/ # API-specific modules
│ │ ├── __init__.py
│ │ ├── realtime_voice.py # OpenAI Realtime Voice API
│ │ └── claude_code_controller.py # Claude Code CLI integration
│ │
│ ├── agents/ # Agent configurations (JSON)
│ │ ├── MainConversation.json # Nested team agent example
│ │ ├── MultimodalVisionAgent.json # Vision agent example
│ │ ├── Manager.json
│ │ ├── Developer.json
│ │ ├── Researcher.json
│ │ └── ... (other agent configs)
│ │
│ ├── tools/ # Custom tool implementations
│ │ ├── memory.py # Memory tools (ChromaDB)
│ │ ├── research.py # Web search & fetch tools
│ │ └── image_tools.py # Screenshot & image generation
│ │
│ ├── tests/ # Test suite
│ │ ├── README.md # Test documentation
│ │ ├── test_image_tools.py # Image tools test suite
│ │ ├── unit/ # Unit tests
│ │ │ ├── test_screenshot.py
│ │ │ └── test_working_image_tools.py
│ │ └── integration/ # Integration tests
│ │ ├── test_claude_code_permissions.py
│ │ ├── test_multimodal_api.py
│ │ ├── test_multimodal_integration.py
│ │ ├── test_real_screenshot.py
│ │ ├── test_system_message_update.py
│ │ └── test_voice_claude_integration.py
│ │
│ ├── scripts/ # Utility scripts
│ │ ├── README.md # Scripts documentation
│ │ ├── fix_x11_and_test.sh # Fix X11 permissions & test
│ │ └── fix_gnome_screenshot.sh # Fix GNOME screenshot tool
│ │
│ ├── docs/ # Backend-specific documentation
│ │ ├── SCREENSHOT_FIX_GUIDE.md
│ │ ├── SCREENSHOT_TESTING_REPORT.md
│ │ ├── SCREENSHOT_TEST_SUMMARY.md
│ │ ├── SCREENSHOT_TOOL_README.md
│ │ ├── MULTIMODAL_AGENT_GUIDE.md
│ │ └── MULTIMODAL_AGENT_IMPLEMENTATION_SUMMARY.md
│ │
│ ├── workspace/ # Agent workspace
│ │ ├── screenshots/ # Screenshots from agents
│ │ ├── test_image.png
│ │ ├── sample_chart.png
│ │ └── ... (other generated files)
│ │
│ ├── venv/ # Python virtual environment
│ └── voice_conversations.db # SQLite voice conversation storage
│
├── frontend/ # React application
│ ├── package.json
│ ├── public/ # Static assets
│ │ └── index.html
│ │
│ └── src/
│ ├── index.js # App entry point
│ ├── App.js # Root component
│ ├── api.js # Backend API client
│ │
│ ├── features/ # Feature-based architecture
│ │ ├── agents/ # Agent management feature
│ │ │ ├── components/
│ │ │ │ ├── AgentEditor.js
│ │ │ │ ├── RunConsole.js
│ │ │ │ └── LogMessageDisplay.js
│ │ │ └── pages/
│ │ │ └── AgentDashboard.js
│ │ │
│ │ ├── tools/ # Tool management feature
│ │ │ ├── components/
│ │ │ │ ├── ToolEditor.js
│ │ │ │ └── CodeEditor.js
│ │ │ └── pages/
│ │ │ └── ToolsDashboard.js
│ │ │
│ │ └── voice/ # Voice assistant feature
│ │ ├── components/
│ │ │ ├── VoiceSessionControls.js
│ │ │ ├── AudioVisualizer.js
│ │ │ ├── ConversationHistory.js
│ │ │ ├── NestedAgentInsights.js
│ │ │ └── ClaudeCodeInsights.js
│ │ └── pages/
│ │ ├── VoiceAssistant.js
│ │ └── VoiceDashboard.js
│ │
│ └── shared/ # Shared components
│ └── components/
│
├── debug/ # Debugging tools
│ ├── screenshot.js # Puppeteer screenshot automation
│ ├── screenshots/ # Screenshot output directory
│ ├── export_voice_conversations.py # Export SQLite to JSON
│ ├── db_exports/ # Database exports
│ │ └── voice_conversations/ # Voice conversation JSON exports
│ ├── AUTOMATED_UI_DEVELOPMENT.md # UI dev workflow guide
│ └── package.json # Debug tools dependencies
│
├── docs/ # Root-level documentation
│ ├── DEVELOPER_GUIDE.md
│ ├── REFACTORING_SUMMARY.md # Backend refactoring notes
│ ├── FRONTEND_REFACTORING.md # Frontend refactoring notes
│ ├── VOICE_ASSISTANT_INTEGRATION_PLAN.md
│ ├── autogen-multimodality.md
│ ├── nested_instructions.md
│ ├── enhance_chat.md
│ ├── enhancements_gpt-research.md
│ ├── deepresearch_enhancements_instructions.md
│ └── instructions-from-gpt.md
│
├── logs/ # Application logs
│ ├── frontend.log
│ └── voice_exports/
│
├── workspace/ # Root workspace (if needed)
│
├── CLAUDE.md # Main development guide
├── PROJECT_STRUCTURE.md # This file
├── README.md # Project README
├── PERMISSION_FIX_SUMMARY.md # Permission fixes documentation
├── install.sh # Installation script
├── run_all.sh # Start both backend & frontend
├── run_backend.sh # Start backend only
├── run_frontend.sh # Start frontend only
└── test_runner.py # Test runner script
| What | Where |
|---|---|
| Main development guide | CLAUDE.md |
| Project README | README.md |
| Backend entry point | backend/main.py |
| Frontend entry point | frontend/src/App.js |
| Task | Location |
|---|---|
| Add new agent | Create JSON in backend/agents/ |
| Add new tool | Create Python module in backend/tools/ |
| Add new test | Add to backend/tests/unit/ or backend/tests/integration/ |
| Add backend docs | Add to backend/docs/ |
| Add frontend feature | Create in frontend/src/features/ |
| Add utility script | Create in backend/scripts/ |
| File | Purpose |
|---|---|
| backend/requirements.txt | Python dependencies |
| backend/.env | API keys, environment variables |
| frontend/package.json | Node.js dependencies |
| backend/agents/*.json | Agent configurations |
Purpose: Configuration loading and data validation
schemas.py- Pydantic models for type safetyconfig_loader.py- Load agents and tools from disk
Purpose: Shared utility functions
context.py- Thread-local agent contextvoice_conversation_store.py- SQLite voice storage
Purpose: Core agent framework implementation
- Agent factories, runners, and implementations
- All agent types (looping, nested, multimodal, code executor)
Purpose: API-specific modules
- Voice assistant integration
- Claude Code CLI controller
Purpose: Agent configuration files (JSON)
- Each file defines one agent's behavior
- Loaded dynamically by config_loader
Purpose: Custom tool implementations
- Python modules with FunctionTool instances
- Auto-discovered by config_loader
Purpose: All test files
unit/- Fast, isolated testsintegration/- Multi-component tests
Purpose: Development and maintenance scripts
- Setup scripts
- Testing scripts
- Utility scripts
Purpose: Backend-specific documentation
- Implementation guides
- Testing reports
- Technical documentation
Purpose: Runtime workspace for agents
- Screenshots
- Generated files
- Temporary storage
Purpose: Feature-based organization
agents/- Agent management UItools/- Tool management UIvoice/- Voice assistant UI
Each feature has:
components/- Feature-specific componentspages/- Full-page views
Purpose: Shared/reusable components
- Components used across features
Purpose: Development debugging tools
- Screenshot automation
- Database exporters
- Development workflows
Purpose: Root-level documentation
- Project-wide documentation
- Planning documents
- Refactoring notes
Purpose: Application logs
- Frontend logs
- Export logs
- Modules:
lowercase_with_underscores.py - Tests:
test_<component>.py - Scripts:
<action>_<target>.sh
- Components:
PascalCase.js - Utilities:
camelCase.js - Tests:
ComponentName.test.js
- Guides:
ALL_CAPS.md - READMEs:
README.md - Notes:
lowercase-with-hyphens.md
- Agent configs:
AgentName.json - Package configs:
package.json,requirements.txt - Environment:
.env
- Create
/backend/agents/MyAgent.json - Define configuration (see CLAUDE.md)
- Test via frontend at
/agents/MyAgent
- Create
/backend/tools/my_tool.py - Implement with FunctionTool
- Export in
tools = [...] - Tool auto-discovered on backend restart
- Unit test:
/backend/tests/unit/test_my_feature.py - Integration:
/backend/tests/integration/test_my_integration.py - Run with
pytest tests/
- Create
/backend/scripts/my_script.sh - Add shebang
#!/bin/bash - Make executable:
chmod +x scripts/my_script.sh - Document in
/backend/scripts/README.md
- Backend-specific:
/backend/docs/MY_DOC.md - Project-wide:
/docs/MY_DOC.md - Update this file if structure changes
The project was recently reorganized for better maintainability:
Tests moved:
- ❌
backend/test_*.py(scattered) - ✅
backend/tests/unit/andbackend/tests/integration/(organized)
Scripts moved:
- ❌
backend/*.sh(mixed with code) - ✅
backend/scripts/(dedicated directory)
Documentation moved:
- ❌
backend/*.md(scattered) - ✅
backend/docs/(organized)
- ✅ Clearer separation of concerns
- ✅ Easier to find files
- ✅ Better for CI/CD integration
- ✅ Follows Python best practices
cd backend
source venv/bin/activate
pytest tests/unit/ -v # Unit tests only
pytest tests/integration/ # Integration tests only
pytest tests/ # All testscd backend
bash scripts/fix_x11_and_test.sh
bash scripts/fix_gnome_screenshot.sh# Backend docs
ls backend/docs/
# Project docs
ls docs/
# Feature READMEs
cat backend/tests/README.md
cat backend/scripts/README.md- Follow naming conventions (see above)
- Place in appropriate directory (see directory purposes)
- Update this document if adding new directories
- Add README if creating new directory structure
- Update CLAUDE.md if affecting development workflow
- Move related files together
- Update all import statements
- Update script paths
- Update documentation
- Test after refactoring
- Regular cleanup of workspace directories
- Remove obsolete test files
- Archive old documentation
- Keep README files up to date
Last Updated: 2025-10-11 Maintained By: Development team Questions? See CLAUDE.md for comprehensive development guide