Releases: rhgs/crewai-go
Release list
v0.4.0 — Staged process and AgenticLoop
What's new in v0.4.0
All features are backward compatible — no breaking changes.
Staged process
Third orchestration mode: stages run in sequence, while tasks within a single stage run concurrently. The output of each stage feeds the following ones via Task.Context. Stages marked Optional continue on failure.
crew.Process = crewai.Staged
crew.Stages = []crewai.Stage{
{Name: "collect", Tasks: []*crewai.Task{researchA, researchB}},
{Name: "synthesize", Tasks: []*crewai.Task{write}},
}Agentic loop
Optional Plan → Execute → Evaluate → Refine cycle. Opt-in via Agent.Loop or Task.Loop. Supports independent evaluator, pass threshold, skip-plan, and rewrite-only refine.
agent.Loop = crewai.NewAgenticLoop(
crewai.WithMaxRefinements(3),
crewai.WithPassThreshold(80),
)New sentinels
ErrNoStagesErrEvaluationFailedErrInvalidEvaluation
Examples
go run ./examples/stagedgo run ./examples/agentic_loop(offline, mock LLM)
Docs
See CHANGELOG and the bilingual README / docs.
Full changelog: https://github.com/rhgs/crewai-go/blob/v0.4.0/CHANGELOG.md
v0.3.0 — Native tool calling, Web search, slog migration
What's new in v0.3.0
Native tool calling
Agent.ToolMode ("react" | "native") selects between the existing text-based ReAct loop and native function calling via the new ToolCallingLLM interface. Implemented for Ollama, OpenAI, Anthropic, and Mock.
ToolSpec,ToolCall,ToolCallResponse,ToolTracetypesToolCallingLLM.CallWithTools(ctx, messages, toolSpecs)— provider-native tool dispatch- Security limits: max args/output/response bytes, JSON depth, arg validation
ToolTracesinTaskOutputfor observability
Web search — agent-driven
WebSearcher interface + SearchWeb(ctx, llm, query, max) helper for direct web search from Go code. Implemented by:
- Ollama —
POST /api/web_search(pure search, no model invocation) - OpenAI —
web_search_optionswith search-capable models - Anthropic —
web_search_20250305server tool - xAI — delegates to OpenAI-compatible client
Web search — model-driven
tools.WebSearchTool implements Tool + FactSource for the ReAct loop with pluggable SearchProvider:
| Provider | API key | Free tier |
|---|---|---|
| Wikipedia | ❌ | 100% free (default) |
| LangSearch | ✅ | 100% free |
| Serpstack | ✅ | 1000/month free |
| DuckDuckGo | ❌ | Optional, may be blocked |
| Google CSE | ✅ + CSE ID | Paid |
| Brave | ✅ | Paid |
SSRF protection: blocks non-http(s) schemes, loopback, private, link-local, and unspecified IPs. DNS rebinding prevention via net.LookupIP (fail-closed).
Logging migration to log/slog (#15)
Replaces the custom Logger interface with *slog.Logger from the standard library.
Crew.WithLogger(*slog.Logger) *CrewandAgent.WithLogger(*slog.Logger) *Agent— fluent settersdefaultLogger(verbose)— text handler on stderr,LevelDebugwhenVerbose=true,LevelErrorwhenVerbose=false(matches legacy "silent unless verbose")- All log calls use
InfoContext/DebugContext/WarnContextwith structured key-value pairs Verbosefield preserved for backward compatibility- Subpackages (
llm/*,tools/*) remain logging-free
Security
- Secret redaction in logs (
redact.go): provider errors logged viaWarnContextpass throughredactError, which masks:- Long alphanumeric tokens (≥20 chars), preserving first/last 4 when ≥24
Bearer <token>in HTTP-style messagesapi_key=/token=/key=/secret=query-string values
- Logging safety docs: README + doc.go warn about Debug-level logs containing full LLM output
WithLoggerthread-safety: documented as not concurrent-safe; idempotent (last wins)
Examples
examples/logging/— custom*slog.Loggerwith redaction wrapperexamples/native_tools/— native function calling demonstration
Stats
- 70 files changed, +9,208 / -99 lines (vs v0.2.0)
- Zero external dependencies (stdlib only)
- Test coverage: 96.3% (root package)
- All packages pass under
-race
Full changelog: CHANGELOG.md
v0.2.0 — Structured Output, Guardrails, Facts & Provenance
What's New
All features are backward compatible — no breaking changes.
Structured Output
Task.Structured (*StructuredOutput) requires the model to produce JSON validated against a JSON Schema, with a bounded repair loop (RepairMax, default 2). New sentinels ErrInvalidOutput and ErrRepairBudgetExceeded. Minimal in-house schema validator (type, properties, required, enum, items) — stdlib only, no new dependencies.
Guardrails
Crew-level (Crew.Guardrails) and task-level (Task.Guardrail) post-output validation hooks that block publication of outputs violating business invariants. New sentinel ErrBlockedByGuardrail. Functional options WithGuardrails (crew) and WithGuardrail (task). Complements structured-output schema validation (shape vs. meaning).
Facts & Provenance
First-class Fact type populated only by FactSource tools, never by the LLM. Facts carry source org, source URL, collection time, and payload hash (SHA-256). NewFactSourceTool constructor, AllFactsProvenanced helper for guardrails, dedupFacts by PayloadHash. CrewOutput.Facts and TaskOutput.Facts.
Other
gofmtapplied to all Go files (CI now enforces formatting).
Full Changelog: v0.1.0...v0.2.0
v0.1.0 — crewai-go: idiomatic Go port of CrewAI core
First public release — an idiomatic Go port of the CrewAI framework core. Zero external dependencies (stdlib only).
🌐 Docs in English (default) and Português · CHANGELOG / CHANGELOG.pt-BR.md
✨ Added
- Core orchestration:
Agent,Task,Crew,Process,Tool,Memory, and a text-based ReAct executor. - Processes:
Sequential(default) andHierarchical(manager-driven delegation viaManagerLLM/ManagerAgent). - Context & interpolation: chain task outputs with
WithContext; inject{key}variables throughCrew.Kickoff. - LLM providers (stdlib only, no external deps):
- OpenAI and compatible endpoints (Groq, Azure, Ollama
/v1, …) —llm/openai - Anthropic (Claude) —
llm/anthropic - Ollama local + Ollama Cloud —
llm/ollama - xAI (Grok) via API key or subscription OAuth (Device Flow RFC 8628 + PKCE + refresh + persistence) —
llm/xai - Deterministic mock for tests —
llm/mock
- OpenAI and compatible endpoints (Groq, Azure, Ollama
- Built-in tools:
Calculator(safe recursive-descent parser),CurrentTime,WordCount—toolspackage. - Memory: concurrency-safe in-process memory with substring search.
- Docs & examples: English README + 7 guides; Portuguese mirrors (
docs/pt-BR/); 7 runnable examples; hermetic tests (~90% core coverage).
🔒 Security
- Secrets never committed;
.gitignoreprotects.claude/,.env,*token.json. - xAI OAuth token persisted with
0600permissions.
📦 Install
go get github.com/rhgs/crewai-go@v0.1.0📝 Notes
- License: MIT
- Known limitations of this version: simplified hierarchical delegation (no runtime inter-agent calls), no streaming, in-process memory only, no native function calling. See
PLAN.mdfor the full roadmap.
Primeira release pública — um port idiomático do núcleo do framework CrewAI para Go. Zero dependências externas (apenas stdlib).