{"id":50881302,"url":"https://github.com/lovanto/daedalus-ai","last_synced_at":"2026-06-15T13:02:01.772Z","repository":{"id":362934327,"uuid":"1260160774","full_name":"lovanto/daedalus-ai","owner":"lovanto","description":null,"archived":false,"fork":false,"pushed_at":"2026-06-06T15:40:26.000Z","size":20,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-06T17:08:29.173Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lovanto.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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-06-05T08:02:52.000Z","updated_at":"2026-06-06T15:40:29.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/lovanto/daedalus-ai","commit_stats":null,"previous_names":["lovanto/daedalus-ai"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/lovanto/daedalus-ai","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lovanto%2Fdaedalus-ai","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lovanto%2Fdaedalus-ai/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lovanto%2Fdaedalus-ai/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lovanto%2Fdaedalus-ai/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lovanto","download_url":"https://codeload.github.com/lovanto/daedalus-ai/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lovanto%2Fdaedalus-ai/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34363557,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-15T02:00:07.085Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2026-06-15T13:02:01.626Z","updated_at":"2026-06-15T13:02:01.763Z","avatar_url":"https://github.com/lovanto.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Daedalus AI Layer\n\nPython 3.11 · FastAPI · Ollama — LLM-powered assist endpoints for the ADLC platform.\n\nThis service is **internal-only**. The frontend never calls it directly; the Go API proxies all requests.\n\n## Overview\n\nThe AI layer wraps a locally running Ollama instance (or Anthropic cloud fallback) and exposes structured endpoints for each ADLC phase:\n\n| Router | Prefix | Purpose |\n|--------|--------|---------|\n| `assist` | `/ai/assist/` | Define suggestions, system-prompt generation, tune fixes |\n| `eval` | `/ai/eval/` | Suggest eval cases, classify failures, run \u0026 score cases |\n| `analyze` | `/ai/analyze/` | Observation pattern analysis, scope-drift detection |\n\n## Tech stack\n\n| Dependency | Version |\n|---|---|\n| Python | 3.11 |\n| FastAPI | 0.115.5 |\n| Uvicorn | 0.32.1 |\n| httpx | 0.27.2 |\n| asyncpg | 0.30.0 |\n| Pydantic | 2.10.3 |\n| pydantic-settings | 2.6.1 |\n\n## Project layout\n\n```\nbackend/ai/\n├── main.py              # FastAPI app, middleware, lifecycle hooks\n├── config.py            # Settings via pydantic-settings / .env\n├── db.py                # asyncpg connection pool\n├── utils.py             # extract_json helper\n├── ollama/\n│   ├── client.py        # OllamaClient — generate(), is_reachable()\n│   └── prompts.py       # All prompt-builder functions\n├── models/\n│   └── schemas.py       # Pydantic request/response models\n└── routers/\n    ├── assist.py        # /ai/assist/* endpoints\n    ├── eval.py          # /ai/eval/* endpoints\n    └── analyze.py       # /ai/analyze/* endpoints\n```\n\n## Configuration\n\nCopy `.env.example` to `.env` (or set environment variables directly):\n\n```env\nOLLAMA_BASE_URL=http://localhost:11434\nOLLAMA_MODEL=llama3\nOLLAMA_TIMEOUT=120.0\nOLLAMA_MAX_RETRIES=3\n\n# Set to \"cloud\" to use Anthropic instead of local Ollama\nOLLAMA_MODE=local\nANTHROPIC_API_KEY=\nANTHROPIC_MODEL=claude-sonnet-4-6\n\nDATABASE_URL=postgres://daedalus:daedalus@localhost:5432/daedalus\nPYTHON_AI_PORT=8001\nGO_API_URL=http://localhost:3010\n```\n\n## Running locally\n\n```bash\n# Install dependencies\npip install -r requirements.txt\n\n# Start the service\nuvicorn main:app --reload --port 8001\n```\n\nOn startup the service pings Ollama and logs which models are available. If the configured model is not pulled locally you will see a warning — run `ollama pull \u003cmodel\u003e` to fix it.\n\n## API endpoints\n\n### Health\n\n```\nGET /ai/health\n```\n\nReturns service status and Ollama reachability.\n\n### Assist\n\n```\nPOST /ai/assist/define\nPOST /ai/assist/build/system-prompt\nPOST /ai/assist/tune/suggest-fix\n```\n\n### Eval\n\n```\nPOST /ai/eval/suggest-cases\nPOST /ai/eval/classify-failure\nPOST /ai/eval/run-case\n```\n\n### Analyze\n\n```\nPOST /ai/analyze/patterns\nPOST /ai/analyze/scope-drift\n```\n\nInteractive docs are available at `http://localhost:8001/docs` (Swagger UI) and `http://localhost:8001/redoc`.\n\n## Docker\n\n```bash\ndocker build -t daedalus-ai .\ndocker run -p 8001:8001 --env-file .env daedalus-ai\n```\n\nOr via the root `docker-compose.yml`:\n\n```bash\ndocker-compose up ai\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flovanto%2Fdaedalus-ai","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flovanto%2Fdaedalus-ai","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flovanto%2Fdaedalus-ai/lists"}