Documentation
¶
Overview ¶
Package agent provides a minimal agent execution runtime: Anthropic API + tool use loop + MCP client + built-in HTTP tools.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrMaxTurns = errors.New("agent: max turns reached")
ErrMaxTurns is returned when the agent exhausts MaxTurns without reaching end_turn.
Functions ¶
This section is empty.
Types ¶
type Agent ¶
type Agent struct {
// contains filtered or unexported fields
}
Agent drives an Anthropic tool-use loop with optional MCP and built-in tools.
type Config ¶
type Config struct {
// MCPURL is the MCP server endpoint. If empty, no MCP tools are available.
MCPURL string
// MCPToken is the Bearer token sent to the MCP server.
MCPToken string
// SystemPrompt is prepended to every conversation as the system message.
SystemPrompt string
// Model is the Anthropic model ID. Defaults to "claude-sonnet-4-6".
Model string
// MaxTurns is the maximum number of tool-use loops before giving up. Defaults to 10.
MaxTurns int
// StreamableHTTP instructs the MCP client to use Streamable HTTP transport
// instead of SSE. Use this when connecting to GitHub MCP or any 2025-03-26+ server.
StreamableHTTP bool
}
Config holds the settings for an Agent run.
Directories
¶
| Path | Synopsis |
|---|---|
|
cmd
|
|
|
agent-forge
command
agent-forge connects to a forge-mcp server and summarises published posts.
|
agent-forge connects to a forge-mcp server and summarises published posts. |
|
agent-github
command
agent-github connects to the GitHub MCP server and summarises open issues.
|
agent-github connects to the GitHub MCP server and summarises open issues. |
Click to show internal directories.
Click to hide internal directories.