agentctl is the interactive REPL for Agent SDK for Go. Type prompts and receive agent responses. It uses the same SDK as your application code and supports both in-process and Temporal runtimes via a YAML config file.
agentctl is not the Go library. Install the SDK with go get github.com/agenticenv/agent-sdk-go. Install agentctl separately — download a release binary or build from source.Install agentctl
Option 1 — Release binary (recommended)
Pre-built binaries for Linux, macOS, and Windows (amd64 and arm64) are on GitHub Releases.- Open the latest release
- Download the archive for your platform from Assets
- Extract and add
agentctlto yourPATH
Option 2 — Build from source
Option 3 — Run without building (development)
From a cloned repository:Quick start
config.sample.yaml from the release assets into your working directory.
Type prompts at the > prompt. Enter exit, quit, or bye to end the session.
Configuration file
| File | Purpose |
|---|---|
cmd/config.sample.yaml | Template — safe to commit |
cmd/config.yaml | Your config — gitignored, copy from sample |
Runtime selection
Setruntime in config.yaml:
| Value | Behavior |
|---|---|
local (default) | In-process — no Temporal server required |
temporal | Durable execution — requires a running Temporal server |
Minimal config.yaml
Environment variables
Environment variables override config file values. Prefer them for secrets.| Variable | Description |
|---|---|
AGENT_RUNTIME | local or temporal |
AGENT_TEMPORAL_HOST | Temporal server host |
AGENT_TEMPORAL_PORT | Temporal gRPC port |
AGENT_TEMPORAL_NAMESPACE | Temporal namespace |
AGENT_TEMPORAL_TASKQUEUE | Task queue name |
AGENT_LLM_PROVIDER | openai, anthropic, or gemini |
AGENT_LLM_APIKEY | LLM API key |
AGENT_LLM_MODEL | Model name |
AGENT_LLM_BASEURL | Optional base URL for OpenAI-compatible proxies |
AGENT_LOGGER_LEVEL | error, warn, info, debug |
AGENT_LOGGER_OUTPUT | Log file path, stdout, or stderr |
MCP servers (optional)
Addmcp.servers entries to config.yaml to connect MCP tool servers. When at least one server is enabled, the CLI registers WithMCPConfig and AutoToolApprovalPolicy so MCP tools run without per-call approval in the REPL.
enabled, name, transport (stdio or streamable_http), command/args (stdio) or url/bearer_token (HTTP), and optional timeout_seconds, retry_attempts, allow_tools, block_tools.
See cmd/config.sample.yaml for HTTP transport, OAuth, and tool filter examples.
SDK vs CLI
| SDK (library) | CLI (agentctl) | |
|---|---|---|
| Install | go get github.com/agenticenv/agent-sdk-go@latest | Download release binary or make build |
| Use | Import pkg/agent in your Go application | Interactive REPL from the terminal |
| Config | Go code — NewAgent(...) options | YAML file + env vars |
go.mod; pin the CLI by downloading the matching release tag.
Logging
agentctl prints only user prompts and agent responses on the console. Internal SDK logs go to a file.
- Default:
cmd/logs/agent.log(gitignored) - Override:
logger.outputin config orAGENT_LOGGER_OUTPUT
Related
Quickstart
Build an agent in your own Go application
Configuration
All SDK options the CLI uses under the hood
MCP
Connect MCP servers programmatically
Running Examples
Run SDK examples from the repository