mirror of
https://github.com/furyhawk/ai_agent.git
synced 2026-07-20 09:45:44 +00:00
- Implemented `conversation-store` for managing conversations and messages. - Created `file-preview-store` to handle file preview state. - Added `sidebar-store` for sidebar visibility management. - Developed `theme-store` for theme persistence and management. - Introduced `kb-selection-store` for managing active knowledge base selections with persistence. chore: define API and chat types - Added types for API responses, authentication, chat messages, conversations, and projects. - Defined interfaces for various entities including users, sessions, and message ratings. build: configure TypeScript and testing setup - Set up `tsconfig.json` for TypeScript configuration. - Created `vitest.config.ts` for testing configuration with Vitest. - Added `vitest.setup.ts` for global test setup including mocks for Next.js router and media queries. - Configured Vercel deployment settings in `vercel.json`.
1.8 KiB
1.8 KiB
AGENTS.md
This file provides guidance for AI coding agents (Codex, Copilot, Cursor, Zed, OpenCode).
Project Overview
ai_agent - FastAPI application generated with Full-Stack AI Agent Template.
Stack: FastAPI + Pydantic v2, PostgreSQL , JWT + API Key auth, Redis , pydantic_ai (openai), RAG (milvus), Next.js 15 (i18n)
Commands
# Run server
cd backend && uv run uvicorn app.main:app --reload
# Tests & lint
pytest
ruff check . --fix && ruff format .
# Migrations
uv run alembic upgrade head
uv run alembic revision --autogenerate -m "Description"
# RAG
uv run ai_agent rag-ingest /path/to/file.pdf --collection docs
uv run ai_agent rag-search "query" --collection docs
# Sync Sources
uv run ai_agent cmd rag-sources
uv run ai_agent cmd rag-source-add
uv run ai_agent cmd rag-source-sync
Project Structure
backend/app/
├── api/routes/v1/ # Endpoints
├── services/ # Business logic
├── repositories/ # Data access
├── schemas/ # Pydantic models
├── db/models/ # DB models
├── agents/ # AI agents
├── rag/ # RAG (embeddings, vector store, ingestion)
│ └── connectors/ # Sync source connectors
└── commands/ # CLI commands
Key Conventions
db.flush()in repositories, notcommit()- Services raise
NotFoundError,AlreadyExistsError - Separate
Create,Update,Responseschemas - Commands auto-discovered from
app/commands/ - Document ingestion via CLI and API upload
- Sync sources: configurable connectors with scheduled sync
More Info
docs/architecture.md- Architecture detailsdocs/adding_features.md- How to add featuresdocs/testing.md- Testing guidedocs/patterns.md- Code patterns