mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-15 21:03:19 +00:00
12 examples showing increasing levels of customization: - 01-minimal: all defaults - 02-custom-model: model and thinking level - 03-custom-prompt: replace or modify prompt - 04-skills: discover, filter, merge skills - 05-tools: built-in tools, custom tools - 06-hooks: logging, blocking, result modification - 07-context-files: AGENTS.md files - 08-slash-commands: file-based commands - 09-api-keys-and-oauth: API key resolution, OAuth config - 10-settings: compaction, retry, terminal settings - 11-sessions: persistence options - 12-full-control: replace everything Also exports FileSlashCommand type from index.ts
755 B
755 B
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