Skip to navigation

Agent Skills examples

Runnable examples that capture a Trace, compile a Skill, and use the Skill in seven agent frameworks

The getzep/zep repository has three runnable Agent Skills examples. Each example runs the full learning loop. A teacher agent completes a task, and the example records the run as a Trace. Zep compiles a Skill from the verified Trace. A student agent then searches for the Skill, reads the Skill Markdown, and completes a new task. The example records the Skill use and the outcome.

All three examples use the same invented banking task. The data is generated locally. The examples do not download a dataset, and they do not use customer data.

ExampleLanguageFrameworksWhat it shows
agent-skills-bankingPythonPydanticAIThe full loop, with a student run before and after the Skill, Pydantic tool and data models, and paired checks
python/agent-skills-frameworksPythonLangGraph, Google ADK, Claude Agent SDKTrace capture from the hooks of each framework with one shared tool layer
typescript/agent-skills-frameworksTypeScriptMastra, OpenAI Codex SDK, EveTrace capture from the hooks of each framework with one shared tool layer

Each example directory has a README with the setup, the run commands, and the local checks.

Requirements

  • A Zep project API key with Agent Skills access, in ZEP_API_KEY. A project without Agent Skills access receives HTTP 403. Use a separate project for the examples.
  • A model provider key. The Python examples and the Mastra and Eve adapters use ANTHROPIC_API_KEY. The Codex adapter uses OPENAI_API_KEY or a Codex login. An OpenAI model in the --student or --teacher option of the banking harness uses OPENAI_API_KEY.
  • Python 3.12 or 3.13 and uv for the Python examples. Node.js 24 for the TypeScript example.

The model calls and the Skill compilation use paid services. Each run creates an Agent, Traces, and a Skill in your Zep project. These resources remain in the project after the run ends.

The banking task

The task is a monthly interest correction at an invented bank. A case has four savings accounts, two checking accounts, and two cards. Each checking account or card can support at most one savings account. The agent must do four things. It finds the eligible packages. It selects the allocation with the largest total annual bonus. It posts one correction credit for each savings account. It saves a discrepancy report for each credit.

The bank policies are in banking.py under DOCUMENTS. The make_case(seed) function generates the account records for one case. The teacher and the student run on different cases, so the optimal allocations differ. The evaluator compares the complete final database, including the report fields, with the expected database. A correct final message cannot replace correct database records.

The tools do the allocation and the credit arithmetic. The agent must apply the policy exclusions, submit the useful alternatives before the first credit, and complete every required write. The examples test policy filtering, candidate submission, and completion of the writes. They do not promise lower token use or lower latency.

The PydanticAI banking harness

The agent-skills-banking example is the most complete example. The tools, the input models, the database, and the reports use Pydantic models. The runner uses the zep-cloud Python SDK for the Agent, the Trace, the learning status, and the Skill search. The learning loop runs three model episodes:

  1. A student model runs without a Skill on a fresh case.
  2. A teacher model runs on a separate case. The runner compares the teacher’s final database with the expected database.
  3. When the teacher passes, the runner creates an Agent, uploads the teacher Trace with external verification, and waits for Zep to compile and admit a Skill.
  4. The same student model runs again on its original case with the live Skill.

The run prints the Skill UUID, the Skill version, the Skill Markdown, and the score, token count, and time of each episode. The run saves the cases, the policies, the retrieved Skill, each episode’s messages and tool calls, and each evaluation under the output directory.

git clone https://github.com/getzep/zep.git
cd zep/examples/python/agent-skills-banking
uv sync --frozen --python 3.12 --group dev
uv run --frozen python walkthrough.py run --output runs/live-001

The runner has these options:

  • --stop-after-skill stops after Zep compiles the Skill, so that you can read the procedure before the assisted student starts. --resume continues the same run.
  • --student, --teacher, --effort, and --teacher-effort select other Anthropic or OpenAI models and effort values.
  • walkthrough.py verify repeats paired student runs, with and without the Skill, on the same case or on new generated cases.

A compiled Skill can contain an incorrect tool argument. Read the procedure against the bank policies and the tool input schemas before you trust the Skill. One successful learning loop does not predict the result of a new compilation.

The Python framework examples

The python/agent-skills-frameworks example shows how LangGraph, Google ADK, and Claude Agent SDK record live Trace events through their own hooks. The three adapters share the banking tools and the Zep calls. Each adapter records the teacher Trace, checks the local banking state, and closes the Trace with the result of that check. After Zep compiles the Skill, the adapter adds the Skill metadata to the student system prompt. The student calls read_skill to get the Skill Markdown.

FrameworkHookCommand
LangGraphA LangChain callback handleruv run python run.py run --framework langgraph --output runs/langgraph-run
Google ADKA BasePlugin with model and tool callbacksuv run python run.py run --framework adk --output runs/adk-run
Claude Agent SDKPreToolUse, PostToolUse, and PostToolUseFailure hooksuv run python run.py run --framework claude-agent-sdk --output runs/claude-agent-sdk-run

Run uv sync --group dev in the example directory before the first command.

The TypeScript framework examples

The typescript/agent-skills-frameworks example shows the same loop with Mastra, the OpenAI Codex SDK, and Eve. The adapters share the banking tools and the Zep calls in TypeScript.

FrameworkHookCommand
MastraonInputAvailable, onOutput, and onStepFinishnpm run run -- run --framework mastra --output runs/mastra-demo
OpenAI Codex SDKrunStreamed events, with the banking tools on a local stdio MCP servernpm run run -- run --framework codex --output runs/codex-demo
Evecall.requested, call.settled, and content.completednpm run run -- run --framework eve --output runs/eve-demo

Run npm ci in the example directory before the first command.

Next steps