Files
pi/packages/coding-agent/examples
T
Mario Zechner 91c52de8be Use serializeConversation in handoff hook
Properly handles all message types including tool calls, thinking,
and tool results instead of manual text extraction.
91c52de8be ยท 2026-01-02 00:45:03 +01:00
History
..
2025-12-22 03:14:30 +01:00

Examples

Example code for pi-coding-agent.

Directories

sdk/

Programmatic usage via createAgentSession(). Shows how to customize models, prompts, tools, hooks, and session management.

hooks/

Example hooks for intercepting tool calls, adding safety gates, and integrating with external systems.

custom-tools/

Example custom tools that extend the agent's capabilities.

Running Examples

cd packages/coding-agent
npx tsx examples/sdk/01-minimal.ts
npx tsx examples/hooks/permission-gate.ts

Documentation