Documentation
¶
Overview ¶
Command agentloop drives an agentloop.Loop from the terminal.
It is the chat surface for the engine in the parent module: it discovers project instructions (AGENTS.md) and skills (SKILL.md) from a workspace directory, composes the default capability bundle, and runs one turn — or an interactive conversation — against an OpenAI-wire-compatible LLM.
Usage:
export OPENAI_API_KEY=sk-... agentloop "What's 12 * 7? Answer as a single number." agentloop chat agentloop doctor
Two output modes. The default is for a human: the loop's activity streams to stderr and stdout receives only the final answer, so `answer=$(agentloop run "...")` captures what you'd expect. With --json, stdout becomes a newline-delimited JSON stream of every run event followed by a terminal result object — the mode another program (or another agent) should drive.