NewAgent without Temporal options, the agent loop runs directly inside your Go process. No Temporal server, no workers, no external orchestration.
Enable
Omit all Temporal configuration:How it works
When you callRun, RunAsync, or Stream, the SDK executes the full agent loop in your process:
- Load conversation history and recalled memory (when configured)
- Call the LLM with the merged tool list
- Execute tool calls and append results
- Repeat until the model finishes or the iteration limit is reached
- Return the result or stream events back to your caller
Capabilities
All SDK capabilities are available on the in-process runtime:- LLM providers (OpenAI, Anthropic, Gemini, custom)
- Tools, MCP, A2A, sub-agents
- Conversation (in-memory), memory, retrieval (RAG)
- Streaming, AG-UI events, hooks
- Human-in-the-loop approvals
- OpenTelemetry observability
Limitations
| Limitation | Detail |
|---|---|
| No crash recovery | If the process exits mid-run, the run is lost — no replay, no resume |
| Single process | No horizontal worker scaling |
| In-memory conversation only | Redis works technically, but split-process deployments require Temporal |
| No split client/worker | DisableLocalWorker and NewAgentWorker require the Temporal runtime |
These limits matter for production workloads where runs must survive deploys or scale independently. For those cases, see Temporal runtime.
When to use
| Scenario | In-process fit |
|---|---|
| Local development and unit testing | Ideal |
| CI pipelines and integration tests | Ideal |
| Simple API or script with short runs | Good |
| Production chat with crash recovery required | Use Temporal |
| Multi-process or horizontally scaled execution | Use Temporal |
Switch to Temporal
AddWithTemporalConfig — no other code changes:
Examples
Simple Agent
Minimal in-process agent with Run()
Stream
Streaming tokens and tool events in-process
Runtimes Overview
Compare in-process and Temporal
Quickstart
Build your first agent