跳到正文
GitHub·· 9 天前AI 评分67

zzir/agents-go 发布 agents-server 智能体调试工作台

zzir/agents-go

AI 导读

zzir/agents-go 发布 agents-server,一个本地单二进制运行的智能体工作台,无需账号和 Docker,使用自己的模型密钥,MIT 许可。

正文

Agent went wrong? See what the model saw, replay it, fork it.

Local, one binary, no account. Your own model keys. MIT.

Release CI Go Reference License: MIT

Get started · What you get · Docs · Examples

A session with the Inspector open beside it: the trace of one run, a generation expanded

Get started

Download agents-server from Releases, then:

./agents-server

Open http://127.0.0.1:9527, paste the token it printed, and in Settings add a provider key (Test connection checks it), then an agent with a model picked from the provider's live list. Nothing here needs Docker.

  1. Say something. The reply streams in. Context shows what the model was sent; Traces shows every call with tokens and latency.
  2. Replay it. Expand a generation in Traces, change the prompt or model, diff the result.
  3. Or fork it. Branch the session at any turn. The original stays, either way.

Running the workbench has the full path, from building from source to sandboxes, PostgreSQL and teams.

What you get

  • Transcript: an append-only session tree: a cancelled run keeps what finished, a paused one survives a restart. Steer a live run: what you type while it works is read at its next step.
  • Context: what the model was sent, and what each part cost. The model is told how full its window is, can search what compaction folded away, and keeps memory of its own: a session's notes, and an agent's facts with your approval. An agent can run in reset mode, where a full window starts over from that memory instead of a summary.
  • Traces: model, tool, handoff and guardrail spans with tokens, latency and errors. No backend to run.
  • Replay: re-run a generation with another prompt, model, settings or tools, diffed against the original. No session is touched.
  • Fork: regenerate or branch at any turn: the parent kept, the other branch a click away. Project files are shared, not copied.
  • Approvals: every tool call visible. Per agent: never ask, ask before changes, or always ask; approve a command once, trust that command, or trust the session — or reject with a reason. A session waiting on you is flagged in every tab.
  • Sandboxes: a Docker container here or on a remote daemon, or any E2B-compatible service. Optional.

Also: MCP servers with OAuth, Agent Skills, background tasks, workflows, image input, and a team mode with Google or GitHub sign-in. Until the workbench has migrations, a release that changes the schema needs the database recreated (Deploying).

Embed the runtime

The workbench is a Go program on top of the agents package; anything it does, your own program can do. Nothing above needs this.

go get github.com/zzir/agents-go
agent := &agents.Agent{
	Name:         "assistant",
	Instructions: agents.StaticInstructions("You are a helpful assistant."),
	Model:        "gpt-6-luna",
}

res, err := agents.RunSync(ctx, agent, "Hello!", agents.RunOptions{
	Model: agents.ModelOptions{Provider: openai.NewProvider()}, // reads OPENAI_API_KEY
})
if err != nil {
	log.Fatal(err)
}
fmt.Println(res.FinalOutputString())

The Quickstart continues from here, and every capability has a runnable program under examples/. The API is pre-1.0: pin a version, and read the release notes before moving.

Docs

License

MIT

来源:GitHub · github.com