{"id":30379095,"url":"https://github.com/assada/agent_template","last_synced_at":"2026-05-05T14:32:04.003Z","repository":{"id":303598912,"uuid":"1015702346","full_name":"assada/agent_template","owner":"assada","description":"FastAPI-based boilerplate for building LangGraph-powered agents with streaming, observability, and modularity in mind.","archived":false,"fork":false,"pushed_at":"2025-10-03T12:02:30.000Z","size":547,"stargazers_count":8,"open_issues_count":7,"forks_count":2,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-04-15T14:12:13.058Z","etag":null,"topics":["docker","fastapi","langchain","langfuse","langgraph","uvicorn"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/assada.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":".github/CODEOWNERS","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-07-07T23:08:54.000Z","updated_at":"2026-03-11T10:38:46.000Z","dependencies_parsed_at":"2025-08-18T12:13:39.581Z","dependency_job_id":null,"html_url":"https://github.com/assada/agent_template","commit_stats":null,"previous_names":["assada/raw_langchain","assada/raw_langgraph","assada/agent_template"],"tags_count":0,"template":true,"template_full_name":null,"purl":"pkg:github/assada/agent_template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/assada%2Fagent_template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/assada%2Fagent_template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/assada%2Fagent_template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/assada%2Fagent_template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/assada","download_url":"https://codeload.github.com/assada/agent_template/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/assada%2Fagent_template/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32653498,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-05T11:29:49.557Z","status":"ssl_error","status_checked_at":"2026-05-05T11:29:48.587Z","response_time":54,"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":["docker","fastapi","langchain","langfuse","langgraph","uvicorn"],"created_at":"2025-08-20T19:04:03.384Z","updated_at":"2026-05-05T14:32:03.971Z","avatar_url":"https://github.com/assada.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AI Agent Template\n\nFastAPI-based boilerplate for building LangGraph-powered agents with streaming, observability, and modularity in mind.\n\n[![CI](https://github.com/assada/agent_template/actions/workflows/ci.yml/badge.svg)](https://github.com/assada/raw_langgraph/actions/workflows/ci.yml)\n\n## TL;DR\n\nThis is a minimal and extendable template for running LangGraph agents over HTTP.\n\nIt supports:\n\n* Server-Sent Events (SSE) streaming for real-time response updates\n* Swagger/OpenAPI docs out of the box (thanks to FastAPI)\n* Langfuse observability and prompt tracing\n* User feedback tracking and thread history\n* Clean FastAPI + Uvicorn setup with Docker, ruff, mypy, and pyright\n* Plug-and-play LangGraph integration, including tool support and memory\n* Dev-friendly structure with clear separation between core app and agent logic\n\nUse it as a starting point for building custom AI agents with solid HTTP and observability layers.\n\n---\n\n## Quick Start\n\n1. Clone\n2. `cp .env.dist .env` and fill in the required environment variables\n3. `docker compose up`\n4. Open your browser and go to `http://localhost:8000`\n\n### Setup local langfuse (https://langfuse.com/self-hosting/docker-compose)\n\n1. Clone the langfuse repository: `git clone https://github.com/langfuse/langfuse.git`\n2. `cd langfuse`\n3. `docker compose up -d`\n4. Open your browser and go to `http://localhost:3000` create a new project and copy the `LANGFUSE_API_KEY` and\n   `LANGFUSE_API_URL` to your `.env` file.\n\n### Development\n\n1. `uv venv`\n2. `uv sync`\n4. `npm run build`\n5. `cd ..`\n6. `uv run dev`\n\n## Status\n\nThis is still a work in progress, but usable.\n\nPRs welcome for:\n\n* OAuth2\n* Guardrails\n* Multi-agent support (with framework abstraction)\n* LangFuse abstraction\n* Evaluations\n* Anything that reduces my boilerplate suffering\n\n### Raw and old TODO:\n\n- [x] Add a way to add tools to the agent\n- [x] Add a way to add a database to the agent (memory, checkpoints, feedback?, etc)\n- [x] Implement graph instead of simple agent\n- [x] Refactor the structure of the project. We need to separate general fastapi app from the agent app.\n- [x] Add more model configuration options (temperature, top_p, etc)\n- [x] Add a way to get a thread history\n- [x] Normalize FastApi headers/request/middleware\n- [x] Add Langfuse integration\n- [x] Add tests\n- [x] refactor checkpointer shit factory\n- [x] thread management Create/Update/Delete (thread model(ulid, user_id, created/updated,\n  title, status[]))\n- [x] Store the thread history in the database (with all custom messages and metadata)\n- [x] Add a way to define a custom agent in config?\n- [ ] ~~Add Langsmith integration~~\n- [ ] ~~Keep alive SSE connection until the user closes the browser tab (??)~~\n- [x] Add a way to validate the user's access token (OAuth2)\n- [ ] 🟡 Add evaluation metrics\n- [ ] 🔴 Add *one more* abstraction layer so the agent can use different frameworks (LangGraph, LlamaIndex, etc.)\n- [ ] 🟠 Add even more fucking abstractions to make it independent of observability tools (LangFuse, LangSmith, Grafana\n  Alloy, or whatever the fuck else)\n- [ ] ⚪ Long-Term memory for each user. I want to add to chat application for real-time per thread prompt tuning - memory\n  insights, response strategies, etc. But this is more about agent implementation not template core. Graph node as \"\n  addon package?\" LOL! https://i.imgur.com/k1jk3cx.png here we go again!\n- [ ] ⚪ Guardrails ([LLMGuard implementation](https://github.com/assada/agent_template/tree/feat/guardrails) or handle\n  by [LiteLLM](https://docs.litellm.ai/docs/proxy/guardrails/quick_start))\n\n⚪ - LOWEST priority | 🟡 - LOW priority | 🟠 - MID priority | 🔴 - HIGH priority | 🟣 - BLOCKER\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fassada%2Fagent_template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fassada%2Fagent_template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fassada%2Fagent_template/lists"}