Nexent Development Guide
This guide provides comprehensive information for developers to understand and contribute to the Nexent project, covering architecture, technology stack, development environment setup, and best practices.
🏗️ Overall Architecture
nexent/
├── frontend/ # Frontend application (Next.js + TypeScript)
├── backend/ # Backend services (FastAPI + Python)
├── sdk/ # Python SDK
├── docker/ # Docker deployment configuration
├── make/ # Build scripts
├── test/ # Test code
└── assets/ # Static resources🛠️ Technology Stack
Frontend Tech Stack
- Framework: Next.js 14 (App Router)
- Language: TypeScript
- UI Library: React + Tailwind CSS
- State Management: React Hooks
- Internationalization: react-i18next
- HTTP Client: Fetch API
Backend Tech Stack
- Framework: FastAPI
- Language: Python 3.10+
- Database: PostgreSQL + Redis + Elasticsearch
- File Storage: MinIO
- Task Queue: Celery + Ray
- AI Framework: smolagents
- Vector Database: Elasticsearch
Deployment Tech Stack
- Containerization: Docker + Docker Compose
- Reverse Proxy: Nginx
- Monitoring: Built-in health checks
- Logging: Structured logging
🧱 Environment Preparation
All setup steps now live in the dedicated Environment Preparation guide. It covers:
- Shared prerequisites for every contributor
- Full-stack Nexent setup (infrastructure, backend, frontend, runtime services)
- SDK-only installation workflows for developers who only need the Python package
Review that guide first, then return here for module-specific details.
🔧 Development Module Guide
🎨 Frontend Development
- Tech Stack: Next.js 14 + TypeScript + React + Tailwind CSS
- Core Features: User interface, real-time chat, configuration management, internationalization
- Details: See Frontend Overview
🔧 Backend Development
- Tech Stack: FastAPI + Python 3.10+ + PostgreSQL + Redis + Elasticsearch
- Core Features: API services, agent management, data processing, vector search
- Details: See Backend Overview
🤖 AI Agent Development
- Framework: Enterprise agent framework based on smolagents
- Core Features: Agent creation, tool integration, reasoning execution, multi-modal support
- Custom Agents: See Agents
- System Prompts: Located in
backend/prompts/ - Implementation Steps: Create instance → Configure tools → Set prompts → Test run
- Details: See Agents
🛠️ Tool Development
- MCP Tool System: Based on Model Context Protocol
- Development Flow: Implement logic → Register tool → Restart service
- Protocol Compliance: Tool development must follow MCP protocol
- Detailed Specification: See Tool Development Guide
📦 SDK Development Kit
- Features: Complete interfaces for AI agents, model calling, tool integration
- Modules: Core agents, data processing, vector database
- Details: See SDK Overview
📊 Data Processing
- File Processing: Supports 20+ formats
- Chunking Strategies: basic, by_title, none
- Streaming Processing: Memory optimization for large files
- Details: See Data Processing Guide
🏗️ Build & Deployment
Docker Build
For detailed build instructions, see Docker Build Guide
📋 Development Best Practices & Important Notes
Code Quality
- Test-Driven: Write unit tests and integration tests
- Code Review: Follow team coding standards
- Documentation: Update related documentation timely
- Error Handling: Comprehensive exception handling and logging
Performance Optimization
- Async Processing: Use async architecture for performance
- Caching Strategy: Proper use of caching mechanisms
- Resource Management: Pay attention to memory and connection pool management
- Monitoring & Debugging: Use performance monitoring tools
Security Considerations
- Input Validation: Strictly validate all input parameters
- Access Control: Implement appropriate access controls
- Sensitive Information: Properly handle sensitive data like API keys
- Security Updates: Regular dependency and security updates
Important Development Notes
- Service Dependencies: Ensure all services are started before testing
- Code Changes: Restart related services after code modifications
- Development Mode: Use debug mode in development environment
- Prompt Testing: System prompts need thorough testing
- Environment Variables: Ensure configuration in
.envfile is correct - Infrastructure: Ensure infrastructure services are running properly before development
💡 Getting Help
Documentation Resources
- Installation Guide - Environment setup and deployment
- FAQ - Frequently asked questions
- User Guide - Nexent user guide
Community Support
- Discord Community - Real-time communication and support
- GitHub Issues - Issue reporting and feature requests
