Skip to content

useaop/aop-examples

Repository files navigation

AOP Examples

Working examples of agents instrumented with the Agent Observability Protocol.

Prerequisites

npx @useaop/collector start

Open http://localhost:4317/dashboard/ to watch sessions in real time.

Simulated Examples (no API key needed)

Simple Agent

Basic AOP integration showing core SDK usage. Runs in ~1 second.

npx tsx simple-agent/agent.ts "TypeScript best practices"

Slow Agent

Same as simple but with realistic delays (~20 seconds). Good for watching the dashboard update live.

npx tsx slow-agent/agent.ts "zero-knowledge proofs"

Deep Research Agent

Full 60-second simulation showing all event types: thoughts, decisions, tool failures, uncertainty, goal changes, memory writes. The best demo of what AOP looks like in practice.

npx tsx deep-research-agent/agent.ts "AI agent frameworks"

Multi-Agent (simulated)

Orchestrator spawning 3 parallel child agents. Demonstrates parent-child session tracking.

npx tsx multi-agent/orchestrator.ts

Real Agent Examples (requires Anthropic API key)

Set your API key first:

export ANTHROPIC_API_KEY=sk-ant-your-key-here

Research Agent

Real Claude-powered research agent that reasons, searches, and produces a report. Demonstrates LLM-generated thoughts, decisions, and uncertainty events.

npx tsx research-agent/agent.ts "The current state of AI agent observability"

Code Review Agent

Analyzes a pull request for security issues, bugs, and code quality. Demonstrates tool calls to external APIs and confidence-based filtering.

npx tsx code-review-agent/agent.ts "acme/backend" 42

Multi-Agent Pipeline

Orchestrator that spawns 3 child agents (researcher, writer, reviewer) in sequence. Demonstrates the full parent-child session tree in the dashboard.

npx tsx multi-agent-pipeline/agent.ts "The impact of AI on software development"

Basic Claude Agent

Minimal Claude API integration with tool use.

npx tsx claude-agent/agent.ts "Research AI observability"

Community

Packages

 
 
 

Contributors