Examples
Each example is its own project (package.json / go.mod / pyproject.toml) so you can copy any one of them out of the repo and run it standalone.
Task planning
Section titled “Task planning”Plan-only and live-checklist examples. For inline snippets see Task planning.
plan-only (TypeScript)Classify a task and print result.plan without running the agent loop.
plan-only (Go)RunPlan with task_plan event logging and structured output.
plan-only (Python)run_plan with optional caller-provided steps.
Messages & file attachments
Section titled “Messages & file attachments”Multi-role messages arrays and file inputs on runs and session turns. For inline snippets see Messages & file attachments.
message-attachments (TypeScript)prompt + attachments, messages array, and session.send.
message-attachments (Go)RunSpec attachments, Messages, and WithAttachments.
message-attachments (Python)Typed helpers, messages array, and session replay metadata.
Tools that return files
Section titled “Tools that return files”Local tools that hand a file back to the model alongside their textual result. For inline snippets see Local tools › Returning files.
tool-files (TypeScript)A local tool returns an SVG chart via LocalToolResult { result, files }.
tool-files (Go)A local tool returns an SVG chart via mantyx.ToolResult.
tool-files (Python)A local tool returns an SVG chart via ToolResult / ToolResultFile.
TypeScript
Section titled “TypeScript”oneshot-local-toolMinimal one-shot run with a local tool.
session-chatInteractive REPL on top of a session.
mixed-toolsCombines local, MANTYX, and plugin tools.
a2a-toolsRemote (mantyxA2A) + local (defineLocalA2A) Agent2Agent peers.
mcp-toolsRemote (mantyxMcp) + local (defineLocalMcp) MCP servers.
streamingToken streaming to stdout.
list-modelsModel catalog plus pick-and-run.
agent-by-idTrigger a persisted MANTYX agent by id.
plan-onlyPlan-only run via runPlan — structured checklist, no agent loop.
message-attachmentsFile inputs on runs and sessions (prompt, messages, session.send).
tool-filesA local tool returns a file (SVG chart) alongside its text result.
computer-useModel-agnostic browser control: screenshot/action loop with Playwright.
oneshotMinimal one-shot run with a local tool.
session-chatInteractive REPL on top of a session.
mixed-toolsCombines local, MANTYX, and plugin tools.
a2a-toolsRemote (MantyxA2A) + local (LocalA2A) Agent2Agent peers.
mcp-toolsRemote (MantyxMcp) + local (LocalMcp) MCP servers.
streamingToken streaming via channel.
list-modelsModel catalog plus pick-and-run.
agent-by-idTrigger a persisted MANTYX agent by id.
plan-onlyPlan-only run via RunPlan — structured checklist, no agent loop.
message-attachmentsFile inputs on runs and sessions (Attachments, Messages, WithAttachments).
tool-filesA local tool returns a file (SVG chart) alongside its text result via ToolResult.
Python
Section titled “Python”oneshot-local-toolMinimal one-shot run with a local tool.
session-chatInteractive REPL on top of a session.
mixed-toolsCombines local, MANTYX, and plugin tools.
a2a-toolsRemote (mantyx_a2a) + local (define_local_a2a) Agent2Agent peers.
mcp-toolsRemote (mantyx_mcp) + local (define_local_mcp) MCP servers.
streamingToken streaming via async iterator.
list-modelsModel catalog plus pick-and-run.
agent-by-idTrigger a persisted MANTYX agent by id.
plan-onlyPlan-only run via run_plan — structured checklist, no agent loop.
message-attachmentsTyped attachments, messages array, and session replay metadata.
tool-filesA local tool returns a file (SVG chart) alongside its text result via ToolResult.
