Samples
The runnable mini-projects behind the catalog — download a folder and run it with Docker.
Title + body
Source tools
Sort: Recently updated
- Agno — a single agent backed by Claude June 28, 2026
samples/agno_1A tiny Agno sample: it builds one agent with a Claude model and runs your prompt. - Anthropic Claude — a tool-using agent turn June 28, 2026
samples/anthropic-claude_1A tiny agent loop built on the official Anthropic SDK: Claude is given one tool (getweather), decides to call it, and the script feeds the result back as a toolresult — looping until Claude writes a final answer. That loop is the core agentic pattern. - Arize Phoenix — trace an LLM call (self-hosted) June 28, 2026
samples/arize-phoenix_1A tiny Phoenix demo: the bundled docker-compose runs a Phoenix server, and the app registers OpenTelemetry tracing, makes one LiteLLM call (auto-instrumented), then queries Phoenix for the spans — proving the round trip, not just that the call didn't error. - AutoGen — implementation sample June 28, 2026
samples/autogen_1A tiny AutoGen (AgentChat) sample: a single assistant agent runs one task. - Chroma — vector similarity search (no server, no key) June 28, 2026
samples/chroma_1A tiny Chroma demo: it stores a few documents — Chroma embeds them with a built-in model — then runs a nearest-neighbour query. Swap the toy docs for your own and it is a RAG retriever. No API key. - Code-sandbox agent — run model-written code in Docker June 28, 2026
samples/docker_1A ~50-line LangGraph ReAct agent with a single runpython tool. Give it a task that needs real computation — "what's the 30th Fibonacci number?" — and the model writes Python, the tool runs it inside a throwaway Docker container (no network, capped CPU/memory, auto-removed), and the agent reads the output and answers. The code never runs on the host. The model is routed through LiteLLM, so the same code works with Anthropic Claude, OpenAI, or Google AI Studio (Gemini) — change MODEL in .env, never the code. - Code-sandbox agent, no LangChain — LiteLLM + LangGraph wired by hand June 28, 2026
samples/docker_2The same agent as docker1 — a ReAct loop with a single runpython tool that executes model-written code inside a throwaway Docker container — but with only two agent dependencies: litellm for model routing and langgraph for the loop runtime. No LangChain glue: the tool schema is hand-written JSON, tool calls are dispatched by hand, and the state is a plain list of OpenAI-format message dicts. The model is still routed through LiteLLM, so the same code works with Anthropic Claude, OpenAI, or Google AI Studio (Gemini) — change MODEL in .env, never the code. - CrewAI — a one-agent crew June 28, 2026
samples/crewai_1A tiny CrewAI script: it defines an agent (role + goal) and a task, groups them in a Crew, and runs kickoff. - DeepEval — implementation sample June 28, 2026
samples/deepeval_1A tiny DeepEval sample: it scores an answer with the Answer Relevancy metric (LLM-as-judge). - DSPy — a self-optimizing predictor June 28, 2026
samples/dspy_1A tiny DSPy program: it declares a typed signature (question -> answer), wraps it in a ChainOfThought module, and prints the answer. DSPy builds the prompt — you only describe the task. The LM is routed through LiteLLM, so the same code works with Anthropic Claude, OpenAI, or Google AI Studio (Gemini) — just change MODEL in .env. - Firecrawl web-scraping agent — a docs page to Markdown June 28, 2026
samples/firecrawl_1A ~45-line LangGraph ReAct agent with a single scrape tool backed by Firecrawl. Give it a task that needs a page's contents — "read this docs page and summarize it" — and it fetches the page as clean Markdown, reads it, and answers. The model is routed through LiteLLM, so the same code works with Anthropic Claude, OpenAI, or Google AI Studio (Gemini) — change MODEL in .env, never the code. - Google Gemini — a minimal generate call June 28, 2026
samples/gemini_1A tiny Gemini script: it sends one prompt to a Gemini model with the google-genai SDK and prints the reply. - Guardrails AI — implementation sample June 28, 2026
samples/guardrails-ai_1A tiny Guardrails AI sample: it asks an LLM for JSON, then validates that output against a Pydantic schema — coercing types and enforcing age >= 0 — before you trust it. - instructor — structured output from an LLM June 28, 2026
samples/instructor_1A tiny instructor script: it extracts a typed Person (name, age, occupation) from free text. You define a Pydantic model and get a validated object back — not a string to parse. fromlitellm routes the call, so MODEL picks the provider. - LanceDB — embedded vector search June 28, 2026
samples/lancedb_1A tiny LanceDB script: it creates a table of vectors, runs a nearest-neighbour search, and prints the closest row. Fully embedded — no server, no API key, no network — so the output is deterministic. - Langfuse — trace an LLM call (self-hosted) June 28, 2026
samples/langfuse_1A tiny Langfuse demo: it wraps a Claude call in a Langfuse generation span, sends it to a self-hosted Langfuse, then reads the trace back from the API to prove the round trip (not just "it didn't error"). The bundled docker-compose starts the whole Langfuse stack and bootstraps a project with fixed API keys via LANGFUSEINIT, so there's nothing to click through. - LangGraph — building the graph from scratch June 28, 2026
samples/langgraph_2Where langgraph1 uses the prebuilt createagent, this example wires the ReAct loop by hand with the LangGraph StateGraph API — an agent node, a tools node, and a conditional edge that loops until the model stops requesting tools — then streams each step so you can watch the reasoning unfold. - LangGraph — minimal tool-using agent June 28, 2026
samples/langgraph_1A ~50-line LangGraph ReAct agent: it calls an LLM with two tools (multiply, isprime) and runs the reasoning loop until it can answer. The model is routed through LiteLLM, so the same code works with Anthropic Claude, OpenAI, or Google AI Studio (Gemini) — just change MODEL in .env. - LangSmith — trace a Claude call (hosted) June 28, 2026
samples/langsmith_1A tiny LangSmith demo: @traceable wraps a Claude call so each run shows up in LangSmith, then the app reads the run back via the SDK and prints it — proving the round trip, not just that the call didn't error. LangSmith is a hosted SaaS, so this needs your own API key (there's no free self-host). - LiteLLM — one interface, any provider June 28, 2026
samples/litellm_1A tiny LiteLLM script: it sends one prompt through litellm.completion() and prints the reply. The same call works with Anthropic Claude, OpenAI, or Google AI Studio (Gemini) — change MODEL in .env, never the code. - LlamaIndex — implementation sample June 28, 2026
samples/llamaindex_1A tiny LlamaIndex sample: it indexes two documents and answers a question grounded in them (OpenAI embeddings + LLM). - Mem0 — store and recall a memory June 28, 2026
samples/mem0_1A tiny Mem0 script: it adds a fact for a user, then searches for it. Mem0 distils messages into compact facts (with an LLM) and recalls the relevant ones (from a vector store). The config uses OpenAI. - Milvus Lite — embedded vector search June 28, 2026
samples/milvus_1A tiny Milvus script using Milvus Lite: it creates a collection, inserts a few vectors, runs a similarity search, and prints the closest row. Embedded from a local file — no server, no API key, no network — so the output is deterministic. - mini-SWE-agent — a shell-only coding agent June 28, 2026
samples/mini-swe-agent_1A minimal mini-SWE-agent binding: a DefaultAgent drives a LocalEnvironment with a text-based LiteLLM model. It reads a task, runs one bash command at a time, observes the output, and loops until it submits. The model is routed through LiteLLM, so the same code works with Anthropic Claude, OpenAI, or Google AI Studio (Gemini) — just change MODEL in .env. - NeMo Guardrails — implementation sample June 28, 2026
samples/nemo-guardrails_1A tiny NeMo Guardrails sample: it loads a Colang greeting rail and generates a reply, so the bot answers through a fixed, approved message instead of free-form output. The main and embedding models are both OpenAI, so no local model download is needed. - Ollama — a local LLM call via LiteLLM June 28, 2026
samples/ollama_1A tiny script that calls a model running in a local Ollama server through LiteLLM — no API key, no cloud. Because it goes through LiteLLM, the same code runs against a cloud model by changing MODEL. - OpenAI — a minimal chat call June 28, 2026
samples/openai_1A tiny OpenAI script: it sends one prompt to a GPT model with the official SDK and prints the reply. - OpenAI Agents SDK — implementation sample June 28, 2026
samples/openai-agents-sdk_1A tiny OpenAI Agents SDK sample: it defines an agent and runs your prompt. - OpenHands — an autonomous coding agent (local workspace) June 28, 2026
samples/openhands_1A headless OpenHands run on the OpenHands Agent SDK: it gives the agent terminal + file-editor tools and a task, then runs the read–edit–run loop until done. It uses the SDK's local workspace, so the agent acts inside this container — no nested Docker sandbox — and the whole thing is a single docker run. - OpenRouter — one key, many models (via LiteLLM) June 28, 2026
samples/openrouter_1A tiny OpenRouter script: it sends one prompt through litellm.completion() and prints the reply. OpenRouter is an OpenAI-compatible gateway that fronts hundreds of models behind a single API key — switch between Claude, GPT, Gemini, Llama, and more by changing only MODEL, never the code. - pgvector — vector similarity search in Postgres June 28, 2026
samples/pgvector_1A tiny pgvector demo: it creates a vector column, stores a few toy 3-dim "embeddings", and runs a nearest-neighbour query with the cosine-distance operator (<=>). Swap the toy vectors for an embedding model's output and the SQL is unchanged. - Pydantic AI — a typed agent June 28, 2026
samples/pydantic-ai_1A tiny Pydantic AI script: it extracts a Person (name, age, occupation) from free text. The agent's outputtype is a Pydantic model, so you get a validated object back — not a string to parse. - Qdrant — vector similarity search (no server, no key) June 28, 2026
samples/qdrant_1A tiny Qdrant demo: it stores a few documents in an in-memory collection — fastembed embeds them locally — then runs a nearest-neighbour query. Swap the toy docs for your own and it is a RAG retriever. No API key. - Ragas — implementation sample June 28, 2026
samples/ragas_1A tiny Ragas sample: it scores a RAG answer for faithfulness and response relevancy, judged by an OpenAI model + embeddings. - Sentence Transformers — local embeddings + similarity June 28, 2026
samples/sentence-transformers_1A tiny Sentence Transformers demo: it embeds a few documents and a query on CPU, then ranks the documents by cosine similarity. No API key — the model runs locally. - smolagents — implementation sample June 28, 2026
samples/smolagents_1A tiny smolagents sample: it runs a code agent that writes and executes Python to solve the task. The model is routed through LiteLLM, so any provider works via MODEL. - Tavily web-search agent — asking today's FX rate June 28, 2026
samples/tavily_1A ~40-line LangGraph ReAct agent with a single websearch tool backed by Tavily. Ask it something only current data can answer — "today's USD→KRW rate" — and it searches the web, reads the fresh results, and answers with the number and its sources. The model is routed through LiteLLM, so the same code works with Anthropic Claude, OpenAI, or Google AI Studio (Gemini). Change MODEL in .env, never the code.
No matching samples.