Code examples
Each example is a small, working FastAPI app focused on a real scenario. They are POCs meant for you to read the "core" of jangada usage and copy the pattern into your project — not just loose snippets.
Every example follows the same skeleton: app/main.py (FastAPI),
app/routers/* (endpoints), app/core/* (config, the LLM instance,
observability) and, when there's typed output, app/schemas/* (Pydantic
models). Provider keys come from .env.
The examples
| Example | What it shows | Key features |
|---|---|---|
| Personal assistant | An agent that decides which tools to use | Agent, prebuilt tools, observability |
| AI writer | Rewrite/translate/summarize with cache | {{ }} templates, ExactCache/SemanticCache |
| Fiscal Vision | Reading invoices from a photo | Image, parse (structured output), detect, tools |
| Agent research | Autonomous agents, teams and failover | Agent, Squad, plan, with_fallback, MCP |
| Meeting assistant | Audio → structured minutes → summary | Audio/transcription, Flow, streaming |
| Support with RAG | Support with a knowledge base | RAG, Agent, ScopeGuard, streaming |
How to run (standard)
Every POC runs the same way — only the port changes:
cd pocs/<poc-name>
pip install -r requirements.txt # or use the workspace venv
cp .env.example .env # fill in the provider keys
uvicorn app.main:app --reload --port 8000
# open http://localhost:8000/docs (interactive Swagger)The requirements usually bring
jangada-ai[all,rag,mcp]to enable all providers + documents + RAG + MCP. Install only the extras the example uses if you want a leaner environment (see Installation).
Best practices
Practical recommendations for using jangada in production: provider/model choice, robust structured output, guardrails, RAG, retry/fallback, cost, observability and agents.
Example: Personal assistant
An agent that solves everyday tasks (math, date/time, Wikipedia) by deciding on its own which tools to call.