Skip to content

[do not merge] Add Agent Machine API: spec interface, tool definitions, and example#8

Draft
memgrafter wants to merge 1 commit into
mainfrom
claude/agent-machine-api-8XBRS
Draft

[do not merge] Add Agent Machine API: spec interface, tool definitions, and example#8
memgrafter wants to merge 1 commit into
mainfrom
claude/agent-machine-api-8XBRS

Conversation

@memgrafter

Copy link
Copy Markdown
Owner

Introduces a MachineAPI interface in flatagents-runtime.d.ts that lets an agent running in a tool_loop state control its own FlatMachine runtime via standard LLM function-call tools. The agent can launch/invoke child machines, inspect their checkpoints, read/write its own context, and send signals to paused machines.

Key design: tool schemas are defined in language-agnostic YAML so the same API survives across Python, JS, Rust, Go, Java, and C/C++ SDKs. Each SDK implements MachineAPIToolProvider against its own runtime types.

  • flatagents-runtime.d.ts: MachineAPI, MachineAPIRuntimeInfo, MachineAPIStatus
  • sdk/examples/agent_machine_api/: full working example with orchestrator agent, echo target machine, writer-critic target machine
  • CLAUDE.md: document the Agent Machine API pattern

https://claude.ai/code/session_01PnT2aZWTwgZzEZSx7PyUAU

Introduces a MachineAPI interface in flatagents-runtime.d.ts that lets
an agent running in a tool_loop state control its own FlatMachine runtime
via standard LLM function-call tools. The agent can launch/invoke child
machines, inspect their checkpoints, read/write its own context, and
send signals to paused machines.

Key design: tool schemas are defined in language-agnostic YAML so the
same API survives across Python, JS, Rust, Go, Java, and C/C++ SDKs.
Each SDK implements MachineAPIToolProvider against its own runtime types.

- flatagents-runtime.d.ts: MachineAPI, MachineAPIRuntimeInfo, MachineAPIStatus
- sdk/examples/agent_machine_api/: full working example with orchestrator
  agent, echo target machine, writer-critic target machine
- CLAUDE.md: document the Agent Machine API pattern

https://claude.ai/code/session_01PnT2aZWTwgZzEZSx7PyUAU
@memgrafter memgrafter added the invalid This doesn't seem right label Mar 4, 2026
@memgrafter memgrafter marked this pull request as draft March 4, 2026 20:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

invalid This doesn't seem right

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants