Examples
Examples
Four runnable examples, each one file or two and each about a single idea. Every page below links to its own source.
| Example | Rung | What it shows | Needs a key |
|---|---|---|---|
| Chat agent with a tool | one agent, one tool | A @tool and an Agent discovered from .agentdeck/, then deck.run(...). Six lines of declaration, no JSON schema and no tool loop | yes |
| Agent with a skill | disclosure | A SKILL.md the model loads only when it decides it needs it, across two turns on one session | yes |
| Chat in the terminal | a human in the loop | A @workflow that asks the questions with ctx.ask(...), driven by agentdeck chat | no |
| Run events stream | the event log | A run's typed event log, printed as it arrives from deck.stream(...) | no |
The two without a key run the same on every machine: a @workflow is your own Python, and the
events example scripts the model in-process.
git clone https://github.com/agentdecksdk/agentdeck
cd agentdeck/examples/chat-agent-with-a-tool
export OPENAI_API_KEY=sk-...
python run.pyThe reference application, Jack, is documented separately: he is the agent answering questions on this site, and his page records the reasoning behind each decision in him. He is every rung at once, which is why he is not in the table.
Two rungs have no example yet: concurrent child runs with ctx.parallel(...), and one agent
invoking another with ctx.invoke(...). Both are documented in
Workflows.