@humanlayer/autotune
v0.0.4
Published
Claude SDK PoC
Readme
Claude SDK POC
Multi-agent research orchestrator using the Claude Agent SDK. Spawns parallel specialized agents to gather codebase context for implementation planning.
Usage
# New interactive session
bun run dev # Interactive prompt
bun run dev "your research query" # With initial query
bun run dev --cwd /path/to/repo # Custom working directory
# Continue/Resume sessions
bun run dev --continue # Continue most recent session
bun run dev --resume SESSION_ID # Resume specific session by ID
bun run dev:continue # Shortcut for --continue
# Headless/piped mode (runs query and exits)
echo "your query" | bun run dev # Pipe input
cat query.txt | bun run dev # From fileInteractive Session
After the initial query, the session stays open for follow-ups:
<session_id> > your follow-up question hereExiting
- Type
EXITand press Enter - Press Ctrl+C
- Press Ctrl+D
Session Continuation
- Session IDs are displayed when a session starts
- Use
--resume SESSION_IDto resume any previous session - Use
--continueto resume the most recent session - Both continuation modes fork the session (original is preserved)
Headless Mode
When stdin is not a TTY (piped input), the tool runs in headless mode:
- Runs the query and prints the result to stdout
- Prints session ID to stderr (for scripting/resume)
- Exits after the first response (no interactive prompt)
Structure
index.ts- CLI entry point (Commander.js)src/interactive.ts- Interactive session handlersrc/research.ts- Research orchestrator (legacy one-shot mode)src/agents/- 4 specialized research agents
Key Files
| File | Purpose |
|------|---------|
| src/interactive.ts | Interactive session with AsyncIterable prompt |
| src/research.ts | Legacy planning1Research() function |
| src/agents/index.ts | Agent exports |
| src/evals/run-evals.ts | Eval runner with WorkflowFn type |
If Working On...
Interactive mode: See src/interactive.ts. Uses SDK's AsyncIterable prompt mode for multi-turn conversations.
Evals: See src/evals/. Run bun run eval, accept with bun run eval:accept, diff with bun run eval:diff.
New workflow function: Export from src/research.ts matching (input: ResearchInput) => Promise<ResearchResult>, then add eval cases in run-evals.ts.
Agents: See src/agents/. Each agent is an AgentDefinition with description, tools, model, prompt.
References
- SDK Documentation - Claude TypeScript SDK usage
- Implementation Plan - Full planning doc
