Skip to content

Repository files navigation

Agentium Examples

Runnable examples organized by feature area.

npx tsx examples/<category>/<file>.ts

Categories

basics/ — Getting Started

FileDescription
01-basic-agent.tsMinimal agent with a single prompt
02-agent-with-tools.tsAgent with tool calling (weather + calculator)
13-multimodal-structured.tsMulti-modal input + structured output (Zod)
14-audio-analysis-gemini.tsAudio analysis with Gemini
22-reasoning.tsExtended thinking with Gemini
24-tool-caching.tsTool result caching with TTL

memory/ — Unified Memory & Caching

FileDescription
unified-memory.tsFull-feature demo: sessions, summaries, facts, profile, entities, decisions, curator
23-user-memory.tsCross-session personalization with user facts and profile
25-ask-about-me.tsInteractive REPL with recall tools
browser-with-memory.tsBrowserAgent with persistent context
semantic-cache.tsCache LLM responses by semantic similarity

skills/ — Skills System

FileDescription
basic-skill.tsDefine and load a Skill (tool bundle + instructions)
learned-skills.tsSave and replay successful multi-step workflows

handoff/ — Agent Handoff

FileDescription
agent-handoff.tsTransfer conversations to specialist agents mid-conversation

cost/ — Cost Tracking

FileDescription
cost-tracking.tsTrack token usage, costs, and enforce budgets

eval/ — Evaluation Framework

FileDescription
eval-suite.tsAutomated agent quality testing with scorers and reporters

webhooks/ — Event Destinations

FileDescription
webhook-destinations.tsPush agent events to HTTP, Slack, and custom destinations

telemetry/ — Observability

FileDescription
basic-tracing.tsTrace agent runs with ConsoleExporter, metrics, and structured logs
otel-export.tsExport traces to an OpenTelemetry collector (Jaeger, Grafana Tempo)
langfuse.tsExport traces to Langfuse

teams/ — Multi-Agent Teams

FileDescription
03-team-coordinate.tsTeam of agents in Coordinate mode

workflows/ — Sequential Workflows

FileDescription
04-workflow.tsWorkflow with sequential steps and state

transport/ — HTTP, Socket.IO, A2A

FileDescription
05-express-server.tsAgent behind Express REST endpoints
06-socketio-realtime.tsSocket.IO real-time streaming with unified memory
15-express-swagger.tsExpress + Swagger UI with multi-model agents
17-a2a-server.tsA2A-compliant agent server
18-a2a-client.tsA2A remote agent client (direct, tool, team)

voice/ — Voice Agents

FileDescription
26-voice-openai.tsVoice agent with OpenAI Realtime (mic + speaker)
26-voice-openai-test.tsVoice test: text-in, WAV-out
27-voice-google.tsVoice agent with Google Gemini Live
27-voice-google-test.tsVoice test: Google Gemini Live
29-voice-socketio.tsVoice over Socket.IO with unified memory

browser/ — Browser Automation

FileDescription
30-browser-agent.tsVision + DOM hybrid with stealth & video
31-browser-as-tool.tsBrowserAgent composed as a tool
32-browser-gateway.tsBrowser agent streamed via Socket.IO
33-browser-auth.tsBrowser agent with CredentialVault
35-browser-advanced.tsv2.1.0: indexed actions, batched steps, pageExtractionLLM, useVision: "auto", allowedDomains

knowledge/ — RAG & Knowledge Bases

FileDescription
10-rag-agent.tsRAG agent with InMemory KnowledgeBase
11-rag-qdrant.tsRAG agent with Qdrant
12-rag-mongodb.tsRAG agent with MongoDB Atlas
28-hybrid-search.tsHybrid search (vector + BM25 + RRF)

toolkits/ — External Toolkits

FileDescription
16-mcp-tools.tsMCP tool provider (GitHub)
19-hackernews-toolkit.tsHackerNews toolkit
20-gmail-toolkit.tsGmail toolkit
21-whatsapp-toolkit.tsWhatsApp toolkit

storage/ — Storage & Vector Stores

FileDescription
08-storage-drivers.tsKV storage (InMemory, SQLite, Postgres, MongoDB)
09-vector-stores.tsVector similarity search across backends

safety/ — Safety & Approvals

FileDescription
34-sandbox-tools.tsSandboxed tool execution (timeout, memory limits)
35-human-in-the-loop.tsHuman-in-the-loop approval for sensitive tools

queue/ — Background Jobs

FileDescription
07-background-job.tsAgent jobs via BullMQ queue/worker

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages