Documentation
¶
Overview ¶
Package kiro provides the AWS Kiro CLI agent adapter.
Index ¶
- Constants
- func ReadUserAgent(name string) (*core.Agent, error)
- func UserAgentPath(name string) (string, error)
- func UserAgentsPath() (string, error)
- func WriteUserAgent(agent *core.Agent) error
- type Adapter
- func (a *Adapter) DefaultDir() string
- func (a *Adapter) FileExtension() string
- func (a *Adapter) FromCore(agent *core.Agent) *AgentConfig
- func (a *Adapter) Marshal(agent *core.Agent) ([]byte, error)
- func (a *Adapter) Name() string
- func (a *Adapter) Parse(data []byte) (*core.Agent, error)
- func (a *Adapter) ReadFile(path string) (*core.Agent, error)
- func (a *Adapter) ToCore(kiroCfg *AgentConfig) *core.Agent
- func (a *Adapter) WriteFile(agent *core.Agent, path string) error
- type AgentConfig
- type MCPServerConfig
Constants ¶
const ( // AdapterName is the identifier for this adapter. AdapterName = "kiro" // AgentsDir is the agents directory name. AgentsDir = "agents" // ProjectConfigDir is the project config directory. ProjectConfigDir = ".kiro" )
Variables ¶
This section is empty.
Functions ¶
func ReadUserAgent ¶
ReadUserAgent reads a user-level agent configuration.
func UserAgentPath ¶
UserAgentPath returns the path to a specific user agent config.
func UserAgentsPath ¶
UserAgentsPath returns the path to the user's agents directory.
func WriteUserAgent ¶
WriteUserAgent writes an agent to the user's agents directory.
Types ¶
type Adapter ¶
type Adapter struct{}
Adapter converts between canonical Agent and Kiro CLI agent format.
func (*Adapter) DefaultDir ¶
DefaultDir returns the default directory name for Kiro agents.
func (*Adapter) FileExtension ¶
FileExtension returns the file extension for Kiro agents.
func (*Adapter) FromCore ¶
func (a *Adapter) FromCore(agent *core.Agent) *AgentConfig
FromCore converts canonical Agent to Kiro agent config.
type AgentConfig ¶
type AgentConfig struct {
// Name is the agent identifier.
Name string `json:"name"`
// Description is a human-readable description of the agent's purpose.
Description string `json:"description,omitempty"`
// Tools lists the tools available to this agent.
// Built-in tools: read, write, shell, web_search, web_fetch, etc.
Tools []string `json:"tools,omitempty"`
// AllowedTools lists tools that can execute without user confirmation.
AllowedTools []string `json:"allowedTools,omitempty"`
// Resources lists file paths or glob patterns for context.
// Uses file:// prefix, e.g., "file://README.md", "file://.kiro/steering/**/*.md"
Resources []string `json:"resources,omitempty"`
// Prompt contains the system instructions for the agent.
Prompt string `json:"prompt,omitempty"`
// Model specifies the Claude model to use (e.g., "claude-sonnet-4").
Model string `json:"model,omitempty"`
// MCPServers defines MCP server configurations for this agent.
MCPServers map[string]MCPServerConfig `json:"mcpServers,omitempty"`
// IncludeMcpJson determines whether to inherit servers from workspace/user config.
IncludeMcpJson bool `json:"includeMcpJson,omitempty"`
}
AgentConfig represents a Kiro CLI custom agent configuration. File location: ~/.kiro/agents/[agent-name].json
type MCPServerConfig ¶
type MCPServerConfig struct {
// Command is the executable to launch for stdio servers.
Command string `json:"command,omitempty"`
// Args are command-line arguments for the server.
Args []string `json:"args,omitempty"`
// Env contains environment variables for the server process.
Env map[string]string `json:"env,omitempty"`
// URL is the endpoint for remote HTTP/SSE servers.
URL string `json:"url,omitempty"`
// Headers contains HTTP headers for authentication.
Headers map[string]string `json:"headers,omitempty"`
}
MCPServerConfig represents an MCP server configuration within an agent.