{"id":47765240,"url":"https://github.com/smoothemerson/brdata","last_synced_at":"2026-04-03T06:13:45.290Z","repository":{"id":343560346,"uuid":"1172867275","full_name":"smoothemerson/brdata","owner":"smoothemerson","description":"Conversational AI agent that answers analytical questions about Brazil using real IBGE public data.","archived":false,"fork":false,"pushed_at":"2026-03-24T21:05:46.000Z","size":77,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-26T02:30:04.974Z","etag":null,"topics":["ai-agent","brazil","conversational-ai","docker","fastapi","fastmcp","ibge","langchain","llm","local-llm","mcp","ollama","python"],"latest_commit_sha":null,"homepage":"","language":"Shell","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/smoothemerson.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-03-04T19:15:05.000Z","updated_at":"2026-03-24T21:05:44.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/smoothemerson/brdata","commit_stats":null,"previous_names":["smoothemerson/brdata"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/smoothemerson/brdata","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smoothemerson%2Fbrdata","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smoothemerson%2Fbrdata/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smoothemerson%2Fbrdata/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smoothemerson%2Fbrdata/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/smoothemerson","download_url":"https://codeload.github.com/smoothemerson/brdata/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smoothemerson%2Fbrdata/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31338533,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-03T06:12:52.500Z","status":"ssl_error","status_checked_at":"2026-04-03T06:12:08.917Z","response_time":107,"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-agent","brazil","conversational-ai","docker","fastapi","fastmcp","ibge","langchain","llm","local-llm","mcp","ollama","python"],"created_at":"2026-04-03T06:13:43.716Z","updated_at":"2026-04-03T06:13:45.278Z","avatar_url":"https://github.com/smoothemerson.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ibge-agent\n\nConversational agent that answers analytical questions about Brazil using real data from the [IBGE public API](https://servicodados.ibge.gov.br). Runs entirely locally via Docker Compose.\n\n## Architecture\n\n```\nClient → FastAPI :8000 → LangChain Agent → MCP Server :8001 → IBGE API\n                              ↓\n                         Ollama :11434\n```\n\n## Requirements\n\n- Docker + Docker Compose\n- Ollama with `llama3.2` pulled\n\n## Setup\n\n```bash\ncp .env.example .env\n# Edit .env: set COMPOSE_PROFILES to cpu, gpu-amd, or gpu-nvidia\ndocker compose up\n```\n\n## Environment Variables\n\n| Variable | Default | Description |\n|---|---|---|\n| `COMPOSE_PROFILES` | `cpu` | Ollama profile: `cpu`, `gpu-amd`, `gpu-nvidia` |\n| `OLLAMA_MODEL` | `llama3.2` | Model name to use |\n| `OLLAMA_BASE_URL` | `http://ollama:11434` | Ollama service URL |\n| `MCP_BASE_URL` | `http://mcp:8001/mcp` | MCP server URL |\n| `IBGE_BASE_URL` | `https://servicodados.ibge.gov.br/api` | IBGE API base URL |\n\n## API\n\n### POST /chat\n```json\n// Request\n{ \"question\": \"Quais são os estados do Brasil?\" }\n\n// Response\n{ \"answer\": \"...\" }\n```\n\n### GET /health\n```json\n{ \"healthy\": true }\n```\n\n## MCP Tools\n\n| Tool | Description |\n|---|---|\n| `ibge_get_states` | All 27 Brazilian states with region info |\n| `ibge_get_municipalities` | Municipalities for a given state (2-letter UF code) |\n\n## Local Development\n\n```bash\n# Terminal 1 — MCP server\nuv run python -m mcp_server.server\n\n# Terminal 2 — API\nuv run python -m src.main\n```\n\nSet `MCP_BASE_URL=http://localhost:8001/mcp` and `OLLAMA_BASE_URL=http://localhost:11434` in `.env` for local runs.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsmoothemerson%2Fbrdata","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsmoothemerson%2Fbrdata","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsmoothemerson%2Fbrdata/lists"}