Skip to main content

Pick your starting point

Two paths — both use the same query() function.

Path 1 — With a GitAgent repo URL

GitAgent clones the repo, reads agent.yaml + SOUL.md + skills. Zero config — the repo is your agent.

Path 2 — Without a repo

Pure SDK — point at an existing directory. No agent repo needed. Ideal for embedding in an app you already have.

API Reference

query()

tool()

buildTool()

hooks

These are the same lifecycle hooks used by the Hooks capability — the SDK just lets you register them in code instead of hooks/hooks.yaml.

QueryOptions

Parameters accepted by query()

Message Types

Emitted by the query() async iterator

Cost Tracking

See Utilities for the full shape of the costs() result and for context-compaction helpers.

SDK Quickstart

Install the SDK and run your first query()

Utilities

Context compaction and cost tracking helpers

Telemetry

OpenTelemetry spans, metrics, and Jaeger setup

Capabilities: Tools

Built-in tools available to every agent