Documentation
¶
Index ¶
- func A2A(ctx context.Context, p *pipeline.Pipeline, addr string) error
- func MCPHTTP(ctx context.Context, p *pipeline.Pipeline, addr string, requireSampling bool) error
- func MCPStdio(ctx context.Context, p *pipeline.Pipeline, requireSampling bool) error
- func RunOnce(ctx context.Context, p *pipeline.Pipeline, verbose bool) (string, error)
- func Stdio(ctx context.Context, p *pipeline.Pipeline, once string, verbose bool) error
- type SessionMessage
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func A2A ¶
A2A serves the pipeline's root agent as an A2A JSON-RPC service over HTTP. Publishes an AgentCard at /.well-known/agent.json and dispatches JSON-RPC requests at /. Sessions are kept in-memory.
func MCPHTTP ¶
MCPHTTP exposes the pipeline's root agent as an MCP server over streamable HTTP. Same tool surface as MCPStdio; supports multiple concurrent clients and is addressable by URL. When the pipeline declares any borrowed model the connecting client must advertise the `sampling` capability.
func MCPStdio ¶
MCPStdio exposes the pipeline's root agent as an MCP tool over stdin/stdout. Each tool invocation drives one agent turn and returns the final text. When the pipeline declares any borrowed model, the connecting client must advertise the `sampling` capability; completions for those models round-trip back via sampling/createMessage.
func RunOnce ¶
RunOnce builds a runner, sends a single trigger to the pipeline, and returns the final output. Used by transport=none for fire-and-forget agents (bots, cron jobs, event handlers).
Types ¶
type SessionMessage ¶
type SessionMessage struct {
Role string `json:"role"` // "user" | "assistant"
Text string `json:"text"`
Timestamp time.Time `json:"timestamp,omitempty"`
}
SessionMessage is one visible chat turn returned by GET /sessions/{id}/messages. Tool calls and function responses are dropped; only user input and assistant text replies are kept.