import { query } from "@open-gitagent/gitagent";for await (const msg of query({ prompt: "Summarise the open pull requests", repo: "https://github.com/your-gitagent",})) { if (msg.type === "assistant") console.log(msg.content);}
Clones the repo, reads agent.yaml, SOUL.md, and skills automatically. Zero local setup.
import { query } from "@open-gitagent/gitagent";for await (const msg of query({ prompt: "Refactor the auth module in src/auth.ts", model: "anthropic:claude-sonnet-4-6", dir: "./my-project",})) { if (msg.type === "assistant") console.log(msg.content);}
No agent directory required. Points at a local working directory — ideal for embedding in an existing codebase or CI pipeline.
Both paths use the same query() function. Pick Path 1 when you already have (or want to clone) an OpenGAP agent repo, and Path 2 when you just want to drop GitAgent into an existing codebase.