Skip to content

feat: research Amp SDK API surface and map to agent abstraction #234

@rubenmarcus

Description

@rubenmarcus

Summary

Research the Amp SDK (by Sourcegraph) API surface and map it to ralph-starter's existing agent abstraction layer.

Linear: ENG-1461

What to Research

  1. Amp CLI invocation: How to spawn Amp from CLI, what parameters it accepts
  2. Output format: How Amp streams output (JSON stream, text, etc.)
  3. Tool-use protocol: How Amp's native tool invocation works
  4. Agent modes: Amp has 3 modes — smart (frontier), rush (fast), deep (extended reasoning)
  5. Sub-agent support: How Amp handles sub-agents for specialized tasks
  6. Prompt caching: Amp's native caching capabilities
  7. SDK package: @sourcegraph/amp

Current Agent Abstraction

In src/loop/agents.ts:

  • AgentType union: claude-code | cursor | codex | opencode | unknown
  • AGENTS config: detection command, run command, args
  • runAgent(): spawns subprocess, captures output
  • Amp is listed in AGENTS.md but NOT in the code

Deliverable

Document with API mapping: Amp parameters → ralph-starter agent interface fields.

References

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions