{"id":46589185,"url":"https://github.com/agentic-dev-io/agent-farm","last_synced_at":"2026-04-12T17:46:18.117Z","repository":{"id":329361863,"uuid":"1112348720","full_name":"agentic-dev-io/agent-farm","owner":"agentic-dev-io","description":"DuckDB Spec-OS for multi-org AI agent swarms. 175+ SQL macros, Spec Engine, MCP Apps, meta-learning.","archived":false,"fork":false,"pushed_at":"2026-03-06T17:11:34.000Z","size":14796,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-06T20:49:31.788Z","etag":null,"topics":["ai-agents","duckdb","embeddings","llm","mcp","ollama","python","rag","sql","web-scraping"],"latest_commit_sha":null,"homepage":"https://agentic-dev.io","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/agentic-dev-io.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/CONTRIBUTING.md","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":"2025-12-08T13:56:15.000Z","updated_at":"2026-03-06T20:11:06.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/agentic-dev-io/agent-farm","commit_stats":null,"previous_names":["bjoernbethge/agent-farm"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/agentic-dev-io/agent-farm","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agentic-dev-io%2Fagent-farm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agentic-dev-io%2Fagent-farm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agentic-dev-io%2Fagent-farm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agentic-dev-io%2Fagent-farm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/agentic-dev-io","download_url":"https://codeload.github.com/agentic-dev-io/agent-farm/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agentic-dev-io%2Fagent-farm/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30214721,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-07T12:15:00.571Z","status":"ssl_error","status_checked_at":"2026-03-07T12:15:00.217Z","response_time":53,"last_error":"SSL_read: 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","duckdb","embeddings","llm","mcp","ollama","python","rag","sql","web-scraping"],"created_at":"2026-03-07T13:08:04.055Z","updated_at":"2026-03-07T13:08:04.563Z","avatar_url":"https://github.com/agentic-dev-io.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"https://raw.githubusercontent.com/agentic-dev-io/agent-farm/master/assets/farm.jpg\" alt=\"Agent Farm\" width=\"100%\" /\u003e\n\u003c/div\u003e\n\n# Agent Farm\n\n[![Python](https://img.shields.io/badge/Python-3.11+-blue.svg)](https://www.python.org)\n[![DuckDB](https://img.shields.io/badge/DuckDB-1.1+-yellow.svg)](https://duckdb.org)\n[![MCP](https://img.shields.io/badge/MCP-Protocol-green.svg)](https://modelcontextprotocol.io)\n[![Docker](https://img.shields.io/badge/Docker-Enabled-blue.svg)](https://www.docker.com)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n[![Ask DeepWiki](https://deepwiki.com/badge.svg)](https://deepwiki.com/agentic-dev-io/agent-farm)\n\n[![CI](https://github.com/agentic-dev-io/agent-farm/workflows/CI/badge.svg)](https://github.com/agentic-dev-io/agent-farm/actions/workflows/ci.yml)\n\n**DuckDB Spec-OS for multi-org AI agent swarms.** Central specification management, 280+ SQL macros, interactive agent REPL, MCP Apps, meta-learning, and smart extensions.\n\n---\n\n## Quick Start\n\n```bash\n# Install\nuv add agent-farm\n\n# Interactive REPL (default: OrchestratorOrg)\nagent-farm\n\n# Start MCP server\nagent-farm mcp\n\n# System status\nagent-farm status\n```\n\n### From Source\n\n```bash\ngit clone https://github.com/agentic-dev-io/agent-farm.git\ncd agent-farm\nuv sync\nagent-farm status\n```\n\n### Docker\n\n```bash\ndocker compose up agent-farm     # MCP server + HTTP API on :8080\ndocker compose run test          # Run test suite\n```\n\n---\n\n## CLI\n\n```\nagent-farm                              # Interactive REPL (Orchestrator)\nagent-farm --org dev                    # REPL with DevOrg\nagent-farm --session my-session         # Resume persistent session\n\nagent-farm mcp                          # Start MCP server (stdio)\nagent-farm mcp --http-port 8080         # With HTTP API\n\nagent-farm status                       # Specs + Extensions + Orgs overview\n\nagent-farm spec list [--kind agent]     # List specs\nagent-farm spec get --id 10             # Get spec as JSON\nagent-farm spec search \u003cquery\u003e          # Full-text search\n\nagent-farm app list                     # List MCP Apps (11+)\nagent-farm app render \u003cid\u003e              # Render a MiniJinja app template\n\nagent-farm approval list                # List pending approvals\nagent-farm approval resolve 1 approved  # Resolve approval request\n\nagent-farm sql \u003cfile.sql\u003e               # Execute SQL against initialized DB\n```\n\n### Interactive REPL\n\nThe default mode — chat with AI agents, run slash-commands:\n\n```\n[OrchestratorOrg]\u003e Analyze the project structure and suggest improvements\n[OrchestratorOrg]\u003e /org dev                    # Switch to DevOrg\n[DevOrg]\u003e /spec list --kind agent              # List agent specs\n[DevOrg]\u003e /sql SELECT count(*) FROM spec_objects\n[DevOrg]\u003e /status                              # Quick status summary\n[DevOrg]\u003e /exit                                # Quit (saves session if --session)\n```\n\nREPL responses stream incrementally when the backend supports it.\n\n---\n\n## Architecture\n\n```\nsrc/agent_farm/\n├── cli.py             # Typer CLI (mcp, status, spec, app, sql)\n├── repl.py            # Interactive REPL with slash-commands\n├── main.py            # DuckDB init, extension loading, SQL macros\n├── spec_engine.py     # Spec Engine (central specification management)\n├── orgs.py            # 5 organizations with models, tools, security\n├── schemas.py         # Data models, enums, table definitions\n├── udfs.py            # Python UDFs (agent_chat, agent_tools, etc.)\n└── sql/               # 280+ SQL macros\n    ├── base.sql       # Utilities (url_encode, timestamps)\n    ├── ollama.sql     # LLM calls (Ollama, Anthropic, cloud wrappers)\n    ├── tools.sql      # Web search, shell, Python, fetch, file, git\n    ├── agent.sql      # Security policies, audit, injection detection\n    ├── harness.sql    # Agent harness (model routing, tool execution)\n    ├── orgs.sql       # Org permissions, orchestrator routing\n    ├── org_tools.sql  # SearXNG, CI/CD, notes, render jobs\n    ├── ui.sql         # MCP Apps (24 MiniJinja UI templates)\n    └── extensions.sql # JSONata, DuckPGQ, Radio, Bitfilters (hybrid), Lindel (hybrid)\n\ndb/                    # Spec Engine schema, macros, seed data, intelligence\ntests/                 # pytest test suite\ndocs/                  # Documentation\n```\n\n---\n\n## Multi-Org Swarm\n\n5 specialized organizations with security policies, tool permissions, and denial rules:\n\n| Org | Model | Security | Role |\n|-----|-------|----------|------|\n| **OrchestratorOrg** | kimi-k2.5:cloud | conservative | Task routing, coordination |\n| **DevOrg** | glm-5:cloud | standard | Code, reviews, tests |\n| **OpsOrg** | kimi-k2.5:cloud | power | CI/CD, deploy, render |\n| **ResearchOrg** | gpt-oss:20b-cloud | conservative | SearXNG search, analysis |\n| **StudioOrg** | kimi-k2.5:cloud | standard | Specs, docs, DCC briefings |\n\nEach org has dedicated workspaces, allowed/denied tool lists, approval requirements, and smart extension integrations.\n\nApproval requests are persisted in DuckDB and can be reviewed via `agent-farm approval list`.\n\nRadio messages are persisted in DuckDB, so queued events survive process restarts when using a file-backed database.\n\n---\n\n## SQL Macros (280+)\n\n```sql\n-- LLM calls (routed through Ollama)\nSELECT deepseek('Explain quantum computing');\nSELECT kimi_think('Solve step by step: ...');\nSELECT qwen3_coder('Write a Python function for...');\n\n-- Spec Engine\nSELECT * FROM spec_list_by_kind('agent');\nSELECT * FROM spec_search('planner');\nSELECT spec_render('Hello {{ name }}!', '{\"name\": \"World\"}');\n\n-- Web search\nSELECT brave_search('DuckDB tutorial');\nSELECT searxng('quantum computing');\n\n-- Agent harness\nSELECT quick_agent('agent-1', 'Summarize the project');\nSELECT secure_read('agent-1', '/projects/dev/main.py');\n\n-- Shell \u0026 Python\nSELECT shell('ls -la');\nSELECT py('print(2+2)');\n```\n\nSee [docs/macros.md](docs/macros.md) for the full SQL macro reference (all 280 macros with signatures and descriptions).  \nSee [docs/spec_engine.md](docs/spec_engine.md) for the Spec Engine architecture and runtime guide.\n\n---\n\n## MCP Client Configuration\n\n```json\n{\n  \"mcpServers\": {\n    \"agent-farm\": {\n      \"command\": \"agent-farm\",\n      \"args\": [\"mcp\"],\n      \"env\": {\n        \"DUCKDB_DATABASE\": \".agent_memory.db\"\n      }\n    }\n  }\n}\n```\n\n---\n\n## Environment Variables\n\n| Variable | Description | Default |\n|----------|-------------|---------|\n| `DUCKDB_DATABASE` | Database path | `:memory:` |\n| `SPEC_ENGINE_HTTP_PORT` | HTTP server port | — |\n| `SPEC_ENGINE_API_KEY` | HTTP API key | — |\n| `OLLAMA_BASE_URL` | Ollama endpoint | `http://localhost:11434` |\n| `ANTHROPIC_API_KEY` | Anthropic API key | — |\n| `ANTHROPIC_BASE_URL` | Anthropic endpoint override | `https://api.anthropic.com` |\n| `SEARXNG_BASE_URL` | SearXNG endpoint | `http://searxng:8080` |\n| `BRAVE_API_KEY` | Brave Search key | — |\n\n---\n\n## Development\n\n```bash\nuv sync --extra dev\n\n# Tests\nuv run pytest tests/ -v\n\n# Lint\nuv run ruff check src/ tests/\n\n# Coverage\nuv run pytest tests/ --cov=src/agent_farm\n```\n\n---\n\n## Documentation\n\n- [Spec Engine Reference](docs/spec_engine.md)\n\n---\n\n## License\n\nMIT — see [LICENSE](LICENSE) for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fagentic-dev-io%2Fagent-farm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fagentic-dev-io%2Fagent-farm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fagentic-dev-io%2Fagent-farm/lists"}