{"id":46900854,"url":"https://github.com/aureliolo/ai-company","last_synced_at":"2026-03-11T00:00:22.702Z","repository":{"id":340952531,"uuid":"1168268477","full_name":"Aureliolo/ai-company","owner":"Aureliolo","description":"AI Company - A framework for orchestrating autonomous AI agents as employees within a virtual company structure","archived":false,"fork":false,"pushed_at":"2026-03-06T17:19:55.000Z","size":703,"stargazers_count":0,"open_issues_count":55,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-06T17:27:30.825Z","etag":null,"topics":["ai-agents","autonomous-agents","fastapi","llm","multi-agent","python"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Aureliolo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-02-27T07:34:13.000Z","updated_at":"2026-03-06T17:19:58.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/Aureliolo/ai-company","commit_stats":null,"previous_names":["aureliolo/ai-company"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Aureliolo/ai-company","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Aureliolo%2Fai-company","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Aureliolo%2Fai-company/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Aureliolo%2Fai-company/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Aureliolo%2Fai-company/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Aureliolo","download_url":"https://codeload.github.com/Aureliolo/ai-company/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Aureliolo%2Fai-company/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30362666,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-10T21:41:54.280Z","status":"ssl_error","status_checked_at":"2026-03-10T21:40:59.357Z","response_time":106,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai-agents","autonomous-agents","fastapi","llm","multi-agent","python"],"created_at":"2026-03-11T00:00:18.568Z","updated_at":"2026-03-11T00:00:22.585Z","avatar_url":"https://github.com/Aureliolo.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AI Company\n\n[![CI](https://github.com/Aureliolo/ai-company/actions/workflows/ci.yml/badge.svg)](https://github.com/Aureliolo/ai-company/actions/workflows/ci.yml)\n\nA framework for orchestrating autonomous AI agents as employees within a virtual company structure.\n\n## Concept\n\nAI Company lets you spin up a virtual organization staffed entirely by AI agents. Each agent has a role (CEO, developer, designer, QA, etc.), a personality, persistent memory, and access to real tools. Agents collaborate through structured communication, follow workflows, and produce real artifacts - code, documents, designs, and more.\n\n## Current Capability Snapshot\n\n### Implemented (M0–M6 complete, M7 security + HR partial)\n\n- **Company Config + Core Models** - Strong Pydantic validation, immutable config models, runtime state models\n- **Provider Layer** - LiteLLM-based provider abstraction with routing, retry, and rate limiting\n- **Budget Tracking** - Cost records, summaries, and coordination analytics models\n- **Tool System** - File system tools, git tools, sandbox abstraction (subprocess + Docker), code runner, MCP bridge, permission gating\n- **Single-Agent Engine (M3)** - ReAct/Plan-Execute loops, fail-and-reassign recovery, graceful shutdown\n- **Multi-Agent Core (M4)** - Message bus, delegation with loop prevention, conflict resolution, meeting protocols\n- **Task Intelligence (M4)** - Task decomposition, routing, assignment strategies, workspace isolation via git worktrees\n- **Templates** - Built-in templates, inheritance/merge, rendering, personality presets\n- **Persistence Layer (M5)** - Pluggable `PersistenceBackend` protocol with SQLite backend (aiosqlite), repository protocols, schema migrations\n- **Memory Interface (M5)** - Pluggable `MemoryBackend` protocol with capability discovery, shared knowledge protocol, domain models, config, factory, and context injection retrieval pipeline (ranking, token-budget formatting, non-inferable filtering). Shared organizational memory via `OrgMemoryBackend` protocol with hybrid prompt+retrieval backend. Memory consolidation/archival with pluggable strategies and retention enforcement\n- **Coordination Error Taxonomy (M5)** - Post-execution classification pipeline detecting logical contradictions, numerical drift, context omissions, and coordination failures\n- **Budget Enforcement (M5)** - `BudgetEnforcer` service with pre-flight checks, in-flight budget checking, auto-downgrade, configurable cost tiers, and quota/subscription tracking; `CostOptimizer` CFO service with anomaly detection, efficiency analysis, downgrade recommendations, and approval decisions; `ReportGenerator` for multi-dimensional spending reports\n- **Litestar REST API (M6)** - 13 controllers + WebSocket handler covering company, agents, tasks, budget, approvals, analytics, messages, meetings, projects, departments, artifacts, providers, health, and WebSocket real-time feed\n- **Human Approval Queue (M6)** - Approval submission, approve/reject with reason, list/filter by status, WebSocket notifications for approval events\n- **WebSocket Real-Time Feed (M6)** - Channel-based subscriptions (tasks, agents, budget, messages, system, approvals), per-channel payload filters, message-bus bridge\n- **Route Guards (M6)** - Role-based read/write access control (stub auth for M6; real JWT/OAuth planned for M7)\n- **HR Engine (M7)** - Hiring pipeline (request → generate candidate → approval → instantiate), onboarding checklists, offboarding pipeline (reassign → archive → notify → terminate), agent registry\n- **Performance Tracking (M7)** - Task metrics, CI-based quality scoring, behavioral collaboration scoring, Theil-Sen robust trend detection, multi-window rolling metric aggregation\n- **Progressive Trust (M7)** - 4 strategies (disabled/weighted/per-category/milestone) behind pluggable `TrustStrategy` protocol, trust level tracking, action permission evaluation\n- **Promotion/Demotion (M7)** - Criteria evaluation (ThresholdEvaluator), approval strategies (SeniorityApprovalStrategy), model mapping (SeniorityModelMapping), PromotionService orchestrator\n- **Security Subsystem (M7)** - SecOps agent with rule engine (soft-allow/hard-deny, fail-closed), audit log, output scanner, output scan response policies (redact/withhold/log-only/autonomy-tiered), risk classifier, ToolInvoker integration, autonomy levels (5 tiers with presets, resolver, change strategies), approval timeout policies (wait-forever/auto-deny/tiered/escalation-chain with task park/resume)\n\n### Not implemented yet (planned milestones)\n\n- **Memory Backend Adapter (M5)** - Memory protocols, retrieval pipeline, org memory, and consolidation are complete; initial Mem0 adapter backend ([ADR-001](docs/decisions/ADR-001-memory-layer.md)) pending; research backends (GraphRAG, Temporal KG) planned\n- **CLI Surface** - `cli/` package is placeholder-only\n- **Security/Approval System (M7)** - Real authentication (JWT/OAuth) and approval workflow gates are planned\n- **Advanced Product Surface** - web dashboard, external integrations\n\n## Status\n\n**M7: Security \u0026 Approval** partially complete — Docker sandbox, MCP bridge, code runner, SecOps agent, HR engine + performance tracking, progressive trust, promotion/demotion done; authentication/approval workflow gates remain. See [DESIGN_SPEC.md](DESIGN_SPEC.md) for the full high-level specification.\n\n## Tech Stack\n\n- **Python 3.14+** with Litestar, Pydantic\n- **uv** as package manager, **Hatchling** as build backend\n- **LiteLLM** for multi-provider LLM abstraction\n- **structlog** for structured logging and observability\n- **Mem0** for agent memory (initial backend; custom stack future — see [ADR-001](docs/decisions/ADR-001-memory-layer.md))\n- **MCP** for tool integration\n- **Vue 3** for web dashboard (planned)\n- **SQLite** (aiosqlite) → PostgreSQL for operational data persistence\n- **Docker** with Chainguard Python distroless runtime (CIS-hardened, non-root)\n- **nginx** (unprivileged) for web UI reverse proxy\n\n## System Requirements\n\n- **Python 3.14+**\n- **uv** — package manager ([install](https://docs.astral.sh/uv/getting-started/installation/))\n- **Git 2.x+** — required at runtime for built-in git tools (subprocess-based, not a Python binding)\n- **Docker** (optional) — required for code execution sandbox, Docker-backed tool isolation, and running the full stack via Docker Compose. Install [Docker Desktop](https://docs.docker.com/get-docker/) or Docker Engine. File system and git tools work without Docker via subprocess isolation.\n\n## Getting Started\n\n### Development (local Python)\n\n```bash\ngit clone https://github.com/Aureliolo/ai-company.git\ncd ai-company\nuv sync\n```\n\nSee [docs/getting_started.md](docs/getting_started.md) for prerequisites, IDE setup, and the full walkthrough.\n\n### Docker Compose (full stack)\n\n```bash\ncp docker/.env.example docker/.env   # configure env vars (set LLM_API_KEY)\ndocker compose -f docker/compose.yml build\ndocker compose -f docker/compose.yml up -d\n```\n\nServices (default ports, configurable via `BACKEND_PORT` / `WEB_PORT` in `docker/.env`):\n- **Backend API**: `http://localhost:8000` — Litestar REST + WebSocket\n- **Web Dashboard**: `http://localhost:3000` — placeholder (proxies `/api/` and `/ws` to backend)\n\n```bash\ncurl http://localhost:8000/api/v1/health   # health check (default port)\ndocker compose -f docker/compose.yml down  # stop services\n```\n\nSee [docker/](docker/) for Dockerfiles, compose config, and environment variable reference.\n\n## Documentation\n\n- [Getting Started](docs/getting_started.md) - Setup and installation guide\n- [Contributing](.github/CONTRIBUTING.md) - Branch, commit, and PR workflow\n- [CLAUDE.md](CLAUDE.md) - Code conventions and AI assistant reference\n- [Design Specification](DESIGN_SPEC.md) - Full high-level design\n\n## License\n\n[Business Source License 1.1](LICENSE) — converts to Apache 2.0 on 2030-02-27.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faureliolo%2Fai-company","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faureliolo%2Fai-company","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faureliolo%2Fai-company/lists"}