Fivccliche
A production-ready, multi-user backend framework designed specifically for AI agents. Built with FastAPI and SQLModel for high-performance, type-safe async operations that handle concurrent AI agent requests at scale.
✨ Features
- AI Agent Backend - Purpose-built for multi-user AI agent interactions and orchestration
- FastAPI - Modern, fast web framework for building high-performance APIs with Python 3.11+
- SQLModel - SQL ORM combining SQLAlchemy and Pydantic for type-safe database operations
- Async/Await - Full async support for handling concurrent AI agent requests at scale
- Type Safety - Built-in type hints with Pydantic 2.0 validation for reliable data handling
- Multi-User Support - Designed for managing multiple AI agents with proper isolation and access control
- Scheduled Tasks - APScheduler-based per-module scheduled job support, wired through
IModule.mount - Testing - Pytest with async support for comprehensive test coverage
- Code Quality - Black, Ruff, and MyPy configured for professional code standards
- Package Management -
uvfor fast, reliable dependency management
🚀 Quick Start
Prerequisites
- Python 3.11 or higher
uvpackage manager (install)
Installation
# Clone the repository
git clone https://github.com/MindFiv/FivcCliche.git
cd FivcCliche
# Install production dependencies
uv pip install -e .
# Or install with development tools
uv pip install -e ".[dev]"
Using the CLI
The easiest way to run FivcCliche is using the built-in CLI:
python -m fivccliche.cli migrate # Create missing tables
python -m fivccliche.cli createsuperuser # Interactive admin user
python -m fivccliche.cli run # Start the server
python -m fivccliche.cli jobs list # List scheduled jobs
python -m fivccliche.cli info # Show project information
python -m fivccliche.cli clean # Clean temporary files and cache
Visit http://localhost:8000/docs for interactive API documentation.
Configuration APIs
Authenticated users can manage user-scoped AI agent resources under /configs/.
Superusers create global configs (user_uuid = null) that regular users can read but not update
or delete.
/configs/embeddings/- embedding provider/model configs/configs/models/- LLM provider/model configs withid,description,provider,model,api_key,base_url,temperature,max_tokens, optional nullableenable_thinking,user_uuid,updated_at, andupdated_user_uuidfields.enable_thinking = nullleaves provider behavior unchanged,trueenables provider-supported thinking output, andfalsedisables it./configs/agents/- agent configs that compose models, tools, and skills/configs/tools/- tool configs, including MCP/function transports/configs/skills/- reusable skill configs and resources/configs/questions/- reusable user question configs withid,question, optionalanswer,is_active,user_uuid,updated_at, andupdated_user_uuidfields; list with?is_active=trueor?is_active=falseto filter by active state
python -m fivccliche.cli migrate creates missing tables but does not alter existing
tables. Existing databases created before user_llm.enable_thinking was added need a
manual nullable boolean column on user_llm or a table rebuild. Existing databases
created before chat.updated_at was added need:
ALTER TABLE chat ADD COLUMN updated_at TIMESTAMPTZ NOT NULL DEFAULT NOW();
UPDATE chat SET updated_at = created_at;
CLI Options
# Custom host and port
python -m fivccliche.cli run --host 127.0.0.1 --port 9000
# Production mode (no auto-reload)
python -m fivccliche.cli run --no-reload
# Test configuration without running
python -m fivccliche.cli run --dry-run
# Verbose output
python -m fivccliche.cli run --verbose
📚 Documentation
For detailed information, see the documentation in the docs/ folder:
- Getting Started - Install, migrate, run, and authenticate
- Architecture - Module layering, ownership, HTTP CRUD
- Scheduled Tasks - Per-module APScheduler integration
- Agent Memories - Optional Hindsight memory API
🛠️ Development
CLI Commands
make format # Format code with Black
make lint # Lint with Ruff
make check # Run all checks (format, lint, type check)
Run Tests
pytest
pytest -v --cov=src # With coverage
Code Quality
black src/ tests/ # Format code
ruff check src/ tests/ # Lint code
mypy src/ # Type check
Project Structure
fivccliche/
├── pyproject.toml
├── src/fivccliche/
│ ├── cli.py
│ ├── services/
│ ├── utils/
│ ├── settings/
│ └── modules/
│ ├── users/
│ ├── agent_configs/
│ ├── agent_chats/
│ └── agent_memories/
├── tests/
└── docs/
📦 Dependencies
Production Core: FastAPI, SQLModel, Uvicorn, Pydantic, SQLAlchemy, APScheduler
CLI & Output: Typer, Rich, python-dotenv
Component System: fivcglue, fivcplayground
Development: Pytest, Black, Ruff, MyPy, Coverage
See pyproject.toml for complete dependency list and versions.
📄 License
This project is licensed under the MIT License - see the LICENSE file for details.
👤 Author
Charlie Zhang (sunnypig2002@gmail.com)
🔗 Links
- Repository: https://github.com/MindFiv/FivcCliche
- FastAPI: https://fastapi.tiangolo.com/
- SQLModel: https://sqlmodel.tiangolo.com/
- Pydantic: https://docs.pydantic.dev/
Release files for fivccliche 0.1.95
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| fivccliche-0.1.95.tar.gz | 134.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| fivccliche-0.1.95-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 207.6 kB
Release files / fivccliche-0.1.95.tar.gz
| Download URL | fivccliche-0.1.95.tar.gz |
|---|---|
| Size | 134.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0699e471cad79f0eae4f43bec5173dbab2b5124bae5305d5e3bdd9646d11333d
|
|
BLAKE2b-256 checksum How to use checksums |
8211404c249586a697dabac249b5d6110b5ec376d2e4d0fd09a3ca54cc52678e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.5.10
|
Release files / fivccliche-0.1.95-py3-none-any.whl
| Download URL | fivccliche-0.1.95-py3-none-any.whl |
|---|---|
| Size | 73.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9d4670f52b4428817500f29d73e717d32565a680fe2c7bfbf051158444f49304
|
|
BLAKE2b-256 checksum How to use checksums |
e1c9da1662bd819273a759a2470f0ad2566f8ec0ecde165c60bf45cf5e27f559
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.5.10
|