draftcrew

package module
v0.8.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 20, 2026 License: MIT Imports: 19 Imported by: 0

README

DraftCrew

High-performance Go framework for AI agent orchestration.

Inspired by CrewAI — built for Go. Agents, tasks, crews, and all 6 process types (sequential, hierarchical, consensual, reflective, flow, state machine) in a single binary with zero runtime dependencies.

go get github.com/bzdvdn/draftcrew@latest

Why DraftCrew?

Python-based agent frameworks (CrewAI, AutoGen, LangGraph) are powerful but hit walls in production: GIL contention, no native concurrency, heavy dependency trees, and complex deployment. DraftCrew brings agent orchestration to Go's world:

  • Goroutines, not GIL — true parallel agent execution via Go's concurrency model
  • Static typing — catch misconfigurations at compile time, not runtime
  • Single binary — no Python runtime, no pip install, no virtualenvs
  • Type-safe toolsGetOutput[T](result) via generics, zero reflection
  • Production observability — built-in event bus, telemetry, OpenTelemetry bridging
  • MCP-native — Model Context Protocol client for tool discovery (stdio + SSE)

Status: v0.8 — Ecosystem & Developer Experience (cli ✅, skills ✅, planner ✅)

Core primitives + A2A delegation + MCP server + WASM/Docker sandbox + knowledge ingestion (RAG) + browser automation + output guardrails + DAG flow bridge + dashboard v2 with real telemetry data. v0.6 quick wins done: file I/O tools, calculator, web search, ask human, Gemini tool calling, MCP stdio server, more LLM providers (Groq, Together AI, Bedrock, Vertex AI). v0.7: output streaming (frame + chunk + SSE bridge) + unified memory with hierarchical scopes, composite scoring, pluggable backends (in-memory + SQLite), callback events, agent/crew integration, and typed event bus with 72+ event types across 13 categories, wildcard/matcher subscriptions, goroutine pool, CallbackBridge migration bridge, OTEL bridge, dashboard SSE bridge. v0.8: tool result caching, JSONC config format, async crew execution, replay system, skills system, CLI enrichment (chat, train, test, version, reset-memories, log-tasks-outputs) — all done. 22+ packages, race-detector clean.

What works today
Feature Status
Agent with ReAct loop, tool calling, memory
UnifiedMemory: hierarchical scopes, composite scoring, pluggable backends (MemVectorStore + SQLiteVecStore)
Memory callback phases: PhaseMemoryRemember / PhaseMemoryRecall
Agent/Crew integration: shared crew memory, auto-injection into system prompt
Task with context passing, HITL
Crew: sequential, hierarchical, consensual, reflective, flow, state machine
Async crew execution: KickoffAsync, Awaitable, KickoffForEach, KickoffForEachAsync, MaxParallel
Replay: selective re-execution from any task (Replay, ReplayFromCheckpoint, Fork, ListCheckpoints)
CLI: draftcrew replay -t <task_id>, draftcrew fork <checkpoint_id>
LLM providers: OpenAI, Anthropic, DeepSeek, Mistral, Ollama, OpenRouter, Azure, Groq, Together AI, Bedrock, Vertex AI
Gemini provider: full tool calling, real SSE streaming, structured output, ToolChoice
Built-in tools: shell, calculator, file I/O, web search, ask human, delegate, A2A delegate, code interpreter
A2A protocol: message envelope, typed payloads, W3C trace context
A2A client: Bearer auth, exponential backoff, circuit breaker, WebSocket streaming
A2A server: POST /, WebSocket /ws, Bearer auth, graceful shutdown
Agent registry: Register, Unregister, Lookup, FindByCapability, ListAll
Agent integration: DelegateTo(), DelegationFuture.Await(), auto-register on start
MCP client (stdio + SSE)
MCP server (SSE + POST, JSON-RPC 2.0, tool/resource registration, agent self-exposure)
MCP stdio server (stdin/stdout JSON-RPC 2.0, initialize/tools/list/tools/call, context cancellation)
Knowledge sources (RAG: text, PDF, CSV, JSON, URL via draftRAG)
Wasm sandbox (wazero — compile & run Go WASM with memory/timeout limits)
Docker sandbox (optional — Python in container with resource limits)
YAML config parser
Event bus + telemetry + OTEL bridge
Eval criteria (contains, regex, LLM judge)
Output guardrails (regex, length, contains, banned words, JSON schema) with task-level retry
Browser automation tool (chromedp: navigate, click, type, extract, screenshot, scroll)
Training/HITL loop: Crew.Train(), feedback persistence, advice injection
Tool result caching: ToolCache interface, LRU backend, CachedTool wrapper, agent/crew config
JSONC config format: comments, trailing commas, split layout (crew.jsonc + agents/.jsonc + tasks/.jsonc), auto-detect, placeholder prompting
CLI (draftcrew run, draftcrew start, draftcrew replay, draftcrew fork, draftcrew chat, draftcrew train, draftcrew test, draftcrew version, draftcrew reset-memories, draftcrew log-tasks-outputs, draftcrew skill create/list)
Dashboard v2: real-time SSE events, token usage, agent states, task timeline, error aggregation
Dashboard v2: HITL pause/resume, task injection, MCP tools, A2A graph, session history + replay
Output streaming: frame streaming (agent thoughts, tool calls, lifecycle) + chunk streaming (per-task output)
SSE bridge: streaming frames/chunks delivered to dashboard /api/events with auth guard
Streaming examples: OpenAI (output-streaming/) + Ollama gemma3:4b (output-streaming-ollama/)
Async crew example: examples/features/async-crew-execution/
Typed event bus: 72+ event types (13 categories), wildcard, matcher, ScopedBus, Listener lifecycle
Event bus features: sync/async publish, goroutine pool, panic recovery, OTEL bridge (build-tag gated)
CallbackBridge: wraps callback.Callback with dual-emit to event bus, telemetry.AttachEventBus convenience
Dashboard SSE bridge: SubscribeEventBus forwards all events.EventBus events to SSE clients
Event bus example: examples/features/event-bus/main.go
Skills System: SKILL.md format, agent/crew level injection, registry, CLI (draftcrew skill create/list)
Skills example: examples/features/skills-system/
Skills YAML config example: examples/features/skills-yaml-config/
Planner: agent-level planning (generate, inject, refine), crew propagation, checkpoint storage, YAML/JSONC config, example

Where we're heading

DraftCrew aims to match CrewAI's feature set and then surpass it in areas where Go excels. The roadmap:

Completed (v0.1–v0.7)
  • Agent/Task/Crew core — ReAct loop, 6 process types, context passing ✅ done
  • A2A Protocol — agent-to-agent delegation with HTTP+WebSocket ✅ done
  • MCP Server + Sandbox — MCP protocol, WASM/Docker code execution ✅ done
  • Knowledge ingestion — RAG with PDF/CSV/URL sources ✅ done
  • Browser automation — chromedp-based web interaction ✅ done
  • Output guardrails — regex, length, contains, banned words, JSON schema ✅ done
  • Training/HITL loop — feedback-loop agent improvement ✅ done
  • Flow ↔ Crew bridge — DAG flow engine wired into crew process types ✅ done
  • Dashboard v2 — real-time monitoring with live telemetry data ✅ done
  • Quick wins — file I/O tools, calculator, web search, ask human, Gemini, MCP stdio, more LLMs ✅ done
  • Output streaming — frame + chunk streaming with SSE bridge ✅ done
  • Unified Memory — hierarchical scopes, composite scoring, MemVectorStore + SQLiteVecStore, agent/crew integration ✅ done
  • Event Bus — 72+ typed events across 13 categories, wildcard/matcher, ScopedBus, Listener, OTEL bridge, CallbackBridge, dashboard SSE bridge ✅ done
  • Tool Result Caching — ToolCache interface, LRU backend, CachedTool wrapper, agent/crew config, cache counters, per-tool policy ✅ done
  • JSONC Config Format — JSONC parser, auto-detect, split layout, CLI routing, placeholder prompting, 20 tests, 0 external deps ✅ done
  • Async Crew Execution — KickoffAsync, Awaitable, KickoffForEach, KickoffForEachAsync, streaming for all 6 process types, ErrCrewBusy, context cancellation, error isolation ✅ done
  • Replay System — Replay, ReplayFromCheckpoint, Fork, enhanced checkpoint schema, CLI commands, ListCheckpoints ✅ done
  • Skills System — SKILL.md format, agent/crew injection, registry, CLI commands ✅ done
  • Planner — agent-level planning, plan generation/injection/refinement, crew propagation, checkpoint storage, YAML/JSONC config, runnable example ✅ done
Next (v0.9+)
Long-term vision
  • Visual workflow builder — DAG-based crew designer
  • gRPC mesh server — distributed agent orchestration across machines
  • Cloud control plane — fleet management for production agent deployments
  • Training/fine-tuning pipeline — feedback-loop agent improvement
Out of scope (for now)

DraftCrew will not become a vector database, a training framework, or a cloud platform. We build the orchestration layer — you bring the infrastructure.

Quick start

package main

import (
    "context"
    "fmt"

    "github.com/bzdvdn/draftcrew/src/pkg/agent"
    "github.com/bzdvdn/draftcrew/src/pkg/crew"
    "github.com/bzdvdn/draftcrew/src/pkg/llm"
    "github.com/bzdvdn/draftcrew/src/pkg/task"
)

func main() {
    llmClient := llm.NewOpenAI("sk-...", "gpt-4")

    a := agent.New(agent.Config{
        Role:    "Researcher",
        Goal:    "Research Go 1.22 features",
        LLM:     llmClient,
        MaxIter: 15,
    })

    t := task.New(task.Config{
        Description:    "Find key features",
        ExpectedOutput: "List of features",
        Agent:          a,
    })

    c := crew.New(crew.Config{
        Agents:  []*agent.Agent{a},
        Tasks:   []*task.Task{t},
        Process: crew.ProcessSequential,
    })

    result, err := c.Kickoff(context.Background())
    if err != nil {
        panic(err)
    }
    fmt.Printf("%+v\n", result)
}

See the Quickstart Guide for the full walkthrough.

Installation

go get github.com/bzdvdn/draftcrew@latest

Or install the CLI:

go install github.com/bzdvdn/draftcrew/cmd/draftcrew@latest

Requires Go 1.22+.

Documentation

Roadmap

Release Focus
v0.1 Foundation — core primitives, sequential process
v0.2 A2A Protocol — agent-to-agent delegation
v0.3 MCP Server + Sandbox — expose agents as MCP servers, WASM/Docker code execution
v0.4 Ecosystem — knowledge ✅, browser ✅, guardrails ✅, training ✅
v0.5 Dashboard v2 + Flow bridge — real-time monitoring ✅, DAG flow engine ✅
v0.6 Quick wins — file I/O tools ✅, calculator ✅, web search ✅, ask human ✅, Gemini ✅, MCP stdio ✅, more LLMs ✅
v0.7 Streaming + Unified Memory + Event Bus — output streaming ✅, hierarchical memory ✅, typed event bus ✅
v0.8 Ecosystem & Developer Experience — tool result caching ✅, JSONC config ✅, async crew ✅, replay ✅, skills ✅, CLI ✅, planner ✅

Detailed roadmap: ROADMAP.md

Contributing

We welcome contributions. See the specs for active work items and AGENTS.md for workflow conventions.

License

MIT — see LICENSE.

Documentation

Overview

Package draftcrew provides a high-performance, idiomatic Go framework for AI agent orchestration.

Includes A2A (agent-to-agent) protocol for inter-agent delegation with HTTP+WebSocket transport, circuit breaker, and agent registry.

Basic usage:

llm := draftcrew.NewOpenAI(os.Getenv("OPENAI_API_KEY"), "gpt-4")
agent := draftcrew.NewAgent(draftcrew.AgentConfig{Role: "Researcher", Goal: "Find trends", LLM: llm})
task := draftcrew.NewTask(draftcrew.TaskConfig{Description: "Research Go 1.22", Agent: agent})
crew := draftcrew.NewCrew(draftcrew.CrewConfig{Agents: []*draftcrew.Agent{agent}, Tasks: []*draftcrew.Task{task}})
result, err := crew.Kickoff(context.Background())

Index

Constants

View Source
const (
	AwaitablePending   = crew.AwaitablePending
	AwaitableRunning   = crew.AwaitableRunning
	AwaitableCompleted = crew.AwaitableCompleted
	AwaitableFailed    = crew.AwaitableFailed
)

Awaitable state constants.

View Source
const (
	ProcessSequential   = crew.ProcessSequential
	ProcessHierarchical = crew.ProcessHierarchical
	ProcessConsensual   = crew.ProcessConsensual
	ProcessReflective   = crew.ProcessReflective
	ProcessFlow         = crew.ProcessFlow
	ProcessStateMachine = crew.ProcessStateMachine
)

ProcessType constants for crew execution modes.

View Source
const (
	PhaseMemoryRecall   = callback.PhaseMemoryRecall
	PhaseMemoryRemember = callback.PhaseMemoryRemember
)

Memory callback phase constants.

View Source
const (
	PhaseAgentInit        = callback.PhaseAgentInit
	PhaseAgentThink       = callback.PhaseAgentThink
	PhaseAgentTool        = callback.PhaseAgentTool
	PhaseAgentOutput      = callback.PhaseAgentOutput
	PhaseAgentComplete    = callback.PhaseAgentComplete
	PhaseAgentError       = callback.PhaseAgentError
	PhaseTaskStart        = callback.PhaseTaskStart
	PhaseTaskComplete     = callback.PhaseTaskComplete
	PhaseTaskError        = callback.PhaseTaskError
	PhaseCrewStart        = callback.PhaseCrewStart
	PhaseCrewComplete     = callback.PhaseCrewComplete
	PhaseCrewError        = callback.PhaseCrewError
	PhaseHumanInput       = callback.PhaseHumanInput
	PhaseReviewRequired   = callback.PhaseReviewRequired
	PhaseFlowStart        = callback.PhaseFlowStart
	PhaseFlowNodeStart    = callback.PhaseFlowNodeStart
	PhaseFlowNodeComplete = callback.PhaseFlowNodeComplete
	PhaseFlowComplete     = callback.PhaseFlowComplete
)

Callback phase constants for agent, task, crew, and flow lifecycle events.

View Source
const (
	EventPhaseTransition = telemetry.EventPhaseTransition
	EventLLMCall         = telemetry.EventLLMCall
	EventToolExecution   = telemetry.EventToolExecution
	EventError           = telemetry.EventError
	EventCheckpoint      = telemetry.EventCheckpoint
)

Telemetry event type constants.

View Source
const (
	PhaseCheckpointSave = callback.PhaseCheckpointSave
	PhaseCheckpointLoad = callback.PhaseCheckpointLoad
	PhaseResumeStart    = callback.PhaseResumeStart
	PhaseResumeComplete = callback.PhaseResumeComplete
	PhaseReplayStart    = callback.PhaseReplayStart
	PhaseReplayComplete = callback.PhaseReplayComplete
	PhaseReplayTaskSkip = callback.PhaseReplayTaskSkip
	PhaseForkStart      = callback.PhaseForkStart
	PhaseForkComplete   = callback.PhaseForkComplete
)

Checkpoint, resume, replay, and fork callback phases.

Variables

View Source
var (
	NewTextFileSource = knowledge.NewTextFileSource
	NewPDFSource      = knowledge.NewPDFSource
	NewCSVSource      = knowledge.NewCSVSource
	NewJSONSource     = knowledge.NewJSONSource
	NewURLSource      = knowledge.NewURLSource
)

Knowledge source constructors.

View Source
var (
	NewOpenAI           = llm.NewOpenAI
	NewAnthropic        = llm.NewAnthropic
	NewGemini           = llm.NewGemini
	NewDeepSeek         = llm.NewDeepSeek
	NewMistral          = llm.NewMistral
	NewOpenRouter       = llm.NewOpenRouter
	NewAzureOpenAI      = llm.NewAzureOpenAI
	NewOllama           = llm.NewOllama
	NewOllamaWithURL    = llm.NewOllamaWithURL
	NewGroq             = llm.NewGroq
	NewTogetherAI       = llm.NewTogetherAI
	NewBedrock          = llm.NewBedrock
	NewVertexAI         = llm.NewVertexAI
	NewOpenAICompatible = llm.NewOpenAICompatible
	WithTemperature     = llm.WithTemperature
	WithMaxTokens       = llm.WithMaxTokens
	WithTopP            = llm.WithTopP
	WithTools           = llm.WithTools
	WithSchema          = llm.WithSchema
	WithToolChoice      = llm.WithToolChoice
)

LLM provider constructors and options.

View Source
var (
	NewTool             = tools.New
	ShellTool           = tools.ShellTool
	CalculatorTool      = tools.CalculatorTool
	ReadFileTool        = tools.ReadFileTool
	WriteFileTool       = tools.WriteFileTool
	EditFileTool        = tools.EditFileTool
	DirTool             = tools.DirTool
	WebSearchTool       = tools.WebSearchTool
	NewWebSearchTool    = tools.NewWebSearchTool
	WithNumResults      = tools.WithNumResults
	WithTimeout         = tools.WithTimeout
	AskHumanTool        = tools.AskHumanTool
	NewAskHumanTool     = tools.NewAskHumanTool
	WithEnabled         = tools.WithEnabled
	WithPrompt          = tools.WithPrompt
	WithAskTimeout      = tools.WithAskTimeout
	WithStdout          = tools.WithStdout
	DelegateWorkTool    = tools.DelegateWorkTool
	DelegateToAgentTool = tools.DelegateToAgentTool
	AskAgentTool        = tools.AskAgentTool
	BrowserTool         = tools.BrowserTool
	WithChromePath      = tools.WithChromePath
	WithTabTimeout      = tools.WithTabTimeout
	WithHeadless        = tools.WithHeadless
	WithRootDir         = tools.WithRootDir
)

Built-in tool constructors.

View Source
var (
	NewLRUCache           = cache.NewLRUCache
	WrapTool              = cache.WrapTool
	CacheKey              = cache.CacheKey
	CacheCountersFromTool = cache.CacheCountersFromTool
)

Cache wrappers.

View Source
var (
	NewShortTerm      = memory.NewShortTerm
	NewEntityMemory   = memory.NewEntityMemory
	NewUnifiedMemory  = memory.NewUnifiedMemory
	NewMemVectorStore = memory.NewMemVectorStore
	NewSQLiteVecStore = memory.NewSQLiteVecStore
	WithDBPath        = memory.WithDBPath
	WithScope         = memory.WithScope
	WithLimit         = memory.WithLimit
	WithImportance    = memory.WithImportance
)

Memory store constructors.

View Source
var (
	ErrNoAgents           = errors.ErrNoAgents
	ErrNoTasks            = errors.ErrNoTasks
	ErrAgentNil           = errors.ErrAgentNil
	ErrLLMFailed          = errors.ErrLLMFailed
	ErrMaxIterations      = errors.ErrMaxIterations
	ErrMaxRPM             = errors.ErrMaxRPM
	ErrInvalidProcess     = errors.ErrInvalidProcess
	ErrToolFailed         = errors.ErrToolFailed
	ErrGuardrail          = errors.ErrGuardrail
	ErrTaskFailed         = errors.ErrTaskFailed
	ErrNoMatchingPath     = errors.ErrNoMatchingPath
	ErrCycleDetected      = errors.ErrCycleDetected
	ErrPathTraversal      = errors.ErrPathTraversal
	ErrStringNotFound     = errors.ErrStringNotFound
	WrapError             = errors.Wrap
	WrapErrorE            = errors.WrapE
	IsError               = errors.Is
	ErrCheckpointNotFound = errors.ErrCheckpointNotFound
	ErrTaskNotFound       = errors.ErrTaskNotFound
	// @sk-task skills-system#T4.1: skill sentinel errors (AC-001)
	ErrSkillNotFound = skill.ErrSkillNotFound
	ErrSkillParse    = skill.ErrSkillParse
)

Sentinel errors and error helpers.

View Source
var (
	NewFlow             = flow.New
	NewEventBus         = telemetry.NewEventBus
	NewMetricsCollector = telemetry.NewMetricsCollector
	NewCallbackBridge   = telemetry.NewCallbackBridge
	NewOTELBridge       = telemetry.NewOTELBridge
)

Constructor functions.

View Source
var (
	NewRegexGuardrail       = guardrail.NewRegexGuardrail
	NewLengthGuardrail      = guardrail.NewLengthGuardrail
	NewContainsGuardrail    = guardrail.NewContainsGuardrail
	NewBannedWordsGuardrail = guardrail.NewBannedWordsGuardrail
	NewJSONSchemaGuardrail  = guardrail.NewJSONSchemaGuardrail
)

Guardrail constructors.

View Source
var (
	NewTrainingStore    = training.NewFileStore
	NewFileStore        = training.NewFileStore
	ConsolidateFeedback = training.Consolidate

	// LoadTrainingAdvice loads consolidated advice for an agent.
	LoadTrainingAdvice = training.LoadAdvice
)

Training constructors.

View Source
var (
	// ParseYAML parses a crew.yaml file.
	ParseYAML     = yamlconfig.Parse
	ParseYAMLFile = yamlconfig.ParseFile
	ToCrewConfig  = yamlconfig.ToCrewConfig
)

CLI entrypoint.

View Source
var ErrCrewBusy = errors.ErrCrewBusy

ErrCrewBusy is returned when KickoffAsync is called while already executing.

View Source
var NewA2AClient = a2a.NewA2AClient

NewA2AClient creates a new A2A client.

View Source
var NewA2AServer = a2a.NewA2AServer

NewA2AServer creates a new A2A server.

View Source
var NewAgent = agent.New

NewAgent creates a new Agent with the given configuration.

View Source
var NewCrew = crew.New

NewCrew creates a new Crew with the given configuration.

View Source
var NewRegistry = skill.NewRegistry

NewRegistry creates a new skill Registry.

View Source
var NewTask = task.New

NewTask creates a new Task with the given configuration.

Functions

func GetOutput

func GetOutput[T any](r *crew.Result, taskID string) (T, error)

GetOutput extracts and unmarshals a typed result from a crew execution result.

Types

type A2AClient added in v0.2.0

type A2AClient = a2a.A2AClient

A2AClient is a type alias for a2a.A2AClient.

type A2AMessage added in v0.2.0

type A2AMessage = a2a.A2AMessage

A2AMessage is a type alias for a2a.A2AMessage.

type A2AServer added in v0.2.0

type A2AServer = a2a.A2AServer

A2AServer is a type alias for a2a.A2AServer.

type Agent

type Agent = agent.Agent

Agent is a type alias for agent.Agent.

type AgentConfig

type AgentConfig = agent.Config

AgentConfig is a type alias for agent.Config.

type AskHumanOption added in v0.6.0

type AskHumanOption = tools.AskHumanOption

AskHumanOption is a type alias for tools.AskHumanOption.

type Awaitable added in v0.8.0

type Awaitable = crew.Awaitable

Awaitable is a type alias for crew.Awaitable.

type AwaitableState added in v0.8.0

type AwaitableState = crew.AwaitableState

AwaitableState is a type alias for crew.AwaitableState.

type CachePolicy added in v0.8.0

type CachePolicy = cache.CachePolicy

CachePolicy is a type alias for cache.CachePolicy.

type Callback

type Callback = callback.Callback

Callback is a type alias for callback.Callback.

type CallbackBridge

type CallbackBridge = telemetry.CallbackBridge

CallbackBridge is a type alias for telemetry.CallbackBridge.

type Checkpoint

type Checkpoint = crew.Checkpoint

Checkpoint is a type alias for crew.Checkpoint.

type CheckpointStore

type CheckpointStore = crew.CheckpointStore

CheckpointStore is a type alias for crew.CheckpointStore.

type Crew

type Crew = crew.Crew

Crew is a type alias for crew.Crew.

type CrewConfig

type CrewConfig = crew.Config

CrewConfig is a type alias for crew.Config.

type CrewError

type CrewError = errors.CrewError

CrewError is a type alias for errors.CrewError.

type CrewStreamingOutput added in v0.7.0

type CrewStreamingOutput = crew.CrewStreamingOutput

CrewStreamingOutput is a type alias for crew.CrewStreamingOutput.

type Criterion

type Criterion = eval.Criterion

Criterion is a type alias for eval.Criterion.

type DurationHistogram

type DurationHistogram = telemetry.DurationHistogram

DurationHistogram is a type alias for telemetry.DurationHistogram.

type EvalResult

type EvalResult = eval.Result

EvalResult is a type alias for eval.Result.

type EventBus

type EventBus = telemetry.EventBus

EventBus is a type alias for telemetry.EventBus.

type EventBusConfig added in v0.6.0

type EventBusConfig = telemetry.EventBusConfig

EventBusConfig is a type alias for telemetry.EventBusConfig.

type EventType

type EventType = telemetry.EventType

EventType is a type alias for telemetry.EventType.

type Flow

type Flow = flow.Flow

Flow is a type alias for flow.Flow.

type FlowEdge

type FlowEdge = flow.Edge

FlowEdge is a type alias for flow.Edge.

type FlowNode

type FlowNode = flow.Node

FlowNode is a type alias for flow.Node.

type FlowResult

type FlowResult = flow.Result

FlowResult is a type alias for flow.Result.

type ForEachResult added in v0.8.0

type ForEachResult = crew.ForEachResult

ForEachResult is a type alias for crew.ForEachResult.

type GenerateOption

type GenerateOption = llm.GenerateOption

GenerateOption is a type alias for llm.GenerateOption.

type Guardrail added in v0.4.0

type Guardrail = guardrail.Guardrail

Guardrail is a type alias for guardrail.Guardrail.

type KnowledgeChunk added in v0.4.0

type KnowledgeChunk = knowledge.Chunk

KnowledgeChunk is a type alias for knowledge.Chunk.

type KnowledgeSource added in v0.4.0

type KnowledgeSource = knowledge.KnowledgeSource

KnowledgeSource is a type alias for knowledge.KnowledgeSource.

type LLM

type LLM = llm.Client

LLM is a type alias for llm.Client.

type MemoryEntry

type MemoryEntry = memory.Entry

MemoryEntry is a type alias for memory.Entry.

type MemoryScope added in v0.7.0

type MemoryScope = memory.MemoryScope

MemoryScope is a type alias for memory.MemoryScope.

type MemoryStore

type MemoryStore = memory.Store

MemoryStore is a type alias for memory.Store.

type Message

type Message = llm.Message

Message is a type alias for llm.Message.

type MetricsSnapshot

type MetricsSnapshot = telemetry.MetricsSnapshot

MetricsSnapshot is a type alias for telemetry.MetricsSnapshot.

type NodeState

type NodeState = crew.NodeState

NodeState is a type alias for crew.NodeState.

type OTELBridge

type OTELBridge = telemetry.OTELBridge

OTELBridge is a type alias for telemetry.OTELBridge.

type OutputCondition

type OutputCondition = flow.OutputCondition

OutputCondition is a type alias for flow.OutputCondition.

type Phase

type Phase = callback.Phase

Phase is a type alias for callback.Phase.

type ProcessType

type ProcessType = crew.ProcessType

ProcessType is a type alias for crew.ProcessType.

type Response

type Response = llm.Response

Response is a type alias for llm.Response.

type Result

type Result = crew.Result

Result is a type alias for crew.Result.

type ScoredMemory added in v0.7.0

type ScoredMemory = memory.ScoredMemory

ScoredMemory is a type alias for memory.ScoredMemory.

type Skill added in v0.8.0

type Skill = skill.Skill

Skill is a type alias for skill.Skill.

type StepInfo

type StepInfo = callback.StepInfo

StepInfo is a type alias for callback.StepInfo.

type StorageBackend added in v0.7.0

type StorageBackend = memory.StorageBackend

StorageBackend is a type alias for memory.StorageBackend.

type StreamChunk

type StreamChunk = llm.StreamChunk

StreamChunk is a type alias for llm.StreamChunk.

type Task

type Task = task.Task

Task is a type alias for task.Task.

type TaskConfig

type TaskConfig = task.Config

TaskConfig is a type alias for task.Config.

type TelemetryEvent

type TelemetryEvent = telemetry.Event

TelemetryEvent is a type alias for telemetry.Event.

type TelemetryMetadata

type TelemetryMetadata = telemetry.Metadata

TelemetryMetadata is a type alias for telemetry.Metadata.

type Tool

type Tool = tools.Tool

Tool is a type alias for tools.Tool.

type ToolCache added in v0.8.0

type ToolCache = cache.ToolCache

ToolCache is a type alias for cache.ToolCache.

type ToolCall

type ToolCall = llm.ToolCall

ToolCall is a type alias for llm.ToolCall.

type ToolDef

type ToolDef = llm.ToolDef

ToolDef is a type alias for llm.ToolDef.

type TrainingFeedback added in v0.4.0

type TrainingFeedback = training.Feedback

TrainingFeedback is a type alias for training.Feedback.

type TrainingStore added in v0.4.0

type TrainingStore = training.Store

TrainingStore is a type alias for training.Store.

type Transport

type Transport = mcp.Transport

Transport is a type alias for mcp.Transport.

type UnifiedMemory added in v0.7.0

type UnifiedMemory = memory.UnifiedMemory

UnifiedMemory is a type alias for memory.UnifiedMemory.

type UnifiedMemoryConfig added in v0.7.0

type UnifiedMemoryConfig = memory.UnifiedMemoryConfig

UnifiedMemoryConfig is a type alias for memory.UnifiedMemoryConfig.

type Usage

type Usage = llm.Usage

Usage is a type alias for llm.Usage.

type YAMLEvalConfig

type YAMLEvalConfig = yamlconfig.EvalConfig

YAMLEvalConfig is a type alias for yamlconfig.EvalConfig.

type YAMLEvalCriterionConfig

type YAMLEvalCriterionConfig = yamlconfig.EvalCriterionConfig

YAMLEvalCriterionConfig is a type alias for yamlconfig.EvalCriterionConfig.

type YAMLLLMConfig

type YAMLLLMConfig = yamlconfig.LLMConfig

YAMLLLMConfig is a type alias for yamlconfig.LLMConfig.

type YAMLMCPServerConfig

type YAMLMCPServerConfig = yamlconfig.MCPServerConfig

YAMLMCPServerConfig is a type alias for yamlconfig.MCPServerConfig.

type YAMLMCPSetup

type YAMLMCPSetup = yamlconfig.MCPSetup

YAMLMCPSetup is a type alias for yamlconfig.MCPSetup.

Directories

Path Synopsis
examples
a2a command
@sk-task a2a#polish: A2A example — two agents communicating via HTTP
@sk-task a2a#polish: A2A example — two agents communicating via HTTP
ask-human command
This example demonstrates AskHumanTool.
This example demonstrates AskHumanTool.
calc-tool command
@sk-task calculator-tool documentation: runnable Go example
@sk-task calculator-tool documentation: runnable Go example
dashboard command
@sk-task dashboard-v2#T4.1: Dashboard integration example
@sk-task dashboard-v2#T4.1: Dashboard integration example
features/async-crew-execution command
@sk-task async-crew-execution#T6.2: runnable example demonstrating async crew execution
@sk-task async-crew-execution#T6.2: runnable example demonstrating async crew execution
features/browser command
@sk-task browser-tool#T4.1: browser example
@sk-task browser-tool#T4.1: browser example
features/guardrails command
This example demonstrates output validation guardrails:
This example demonstrates output validation guardrails:
features/jsonc-config command
@sk-task jsonc-config-format#T4.2: jsonc-config example
@sk-task jsonc-config-format#T4.2: jsonc-config example
features/jsonc-config-ollama command
@sk-task jsonc-config-format#T4.2: Ollama JSONC config example
@sk-task jsonc-config-format#T4.2: Ollama JSONC config example
features/knowledge command
@sk-task knowledge-sources#T4.2: knowledge example
@sk-task knowledge-sources#T4.2: knowledge example
features/mcp-stdio command
@sk-task mcp-stdio-server docs: runnable Go example
@sk-task mcp-stdio-server docs: runnable Go example
features/more-llm-providers command
@sk-task more-llm-providers docs: runnable Go example
@sk-task more-llm-providers docs: runnable Go example
features/output-streaming command
@sk-task output-streaming#T6.2: runnable example demonstrating chunk + frame streaming
@sk-task output-streaming#T6.2: runnable example demonstrating chunk + frame streaming
features/output-streaming-ollama command
@sk-task output-streaming#T6.2: runnable example demonstrating chunk + frame streaming with Ollama
@sk-task output-streaming#T6.2: runnable example demonstrating chunk + frame streaming with Ollama
features/planner command
@sk-task planner#T4.3: runnable example demonstrating agent-level planning
@sk-task planner#T4.3: runnable example demonstrating agent-level planning
features/replay command
@sk-task replay-system#T6.2: runnable example demonstrating replay, replay from checkpoint, and fork
@sk-task replay-system#T6.2: runnable example demonstrating replay, replay from checkpoint, and fork
features/skills-system command
@sk-task skills-system#T4.2: comprehensive example demonstrating the Skills System
@sk-task skills-system#T4.2: comprehensive example demonstrating the Skills System
features/skills-yaml-config command
@sk-task skills-system#T4.2: YAML config example demonstrating skills
@sk-task skills-system#T4.2: YAML config example demonstrating skills
features/tool-caching command
@sk-task tool-caching#T4.2: comprehensive example with agent + Ollama
@sk-task tool-caching#T4.2: comprehensive example with agent + Ollama
features/training command
This example demonstrates the Training/HITL loop:
This example demonstrates the Training/HITL loop:
features/unified-memory command
@sk-task unified-memory#T6.2: runnable unified-memory example (AC-001–AC-011)
@sk-task unified-memory#T6.2: runnable unified-memory example (AC-001–AC-011)
file-tools command
@sk-task file-io-tools documentation: runnable Go example (AC-013)
@sk-task file-io-tools documentation: runnable Go example (AC-013)
gemini-tool-calling command
@sk-task gemini-tool-calling#T4.2: gemini tool calling example
@sk-task gemini-tool-calling#T4.2: gemini tool calling example
mcp-server command
MCP server example — exposes a DraftCrew agent as an MCP-compatible endpoint.
MCP server example — exposes a DraftCrew agent as an MCP-compatible endpoint.
ollama command
@sk-task dashboard-v2#T4.1: Ollama example with gemma3:4b
@sk-task dashboard-v2#T4.1: Ollama example with gemma3:4b
ollama-dashboard command
@sk-task dashboard-v2#T4.1: Ollama + Dashboard integration example
@sk-task dashboard-v2#T4.1: Ollama + Dashboard integration example
process/flow command
This example demonstrates a Flow (DAG) process with parallel execution.
This example demonstrates a Flow (DAG) process with parallel execution.
process/state_machine command
This example demonstrates a StateMachine process with conditional transitions.
This example demonstrates a StateMachine process with conditional transitions.
quickstart command
@sk-task foundation#T5.1: write quickstart example (AC-001, AC-015)
@sk-task foundation#T5.1: write quickstart example (AC-001, AC-015)
sandbox command
Sandbox example — runs code in an isolated WASM sandbox.
Sandbox example — runs code in an isolated WASM sandbox.
web-search command
@sk-task websearch-tool docs: runnable web search example
@sk-task websearch-tool docs: runnable web search example
src
cmd/draftcrew command
Package main implements the DraftCrew CLI with cobra and viper.
Package main implements the DraftCrew CLI with cobra and viper.
eval
Package eval provides evaluation criteria for validating task outputs.
Package eval provides evaluation criteria for validating task outputs.
mcp
Package mcp implements the MCP client with stdio and SSE transports.
Package mcp implements the MCP client with stdio and SSE transports.
pkg/a2a
Package a2a provides connection registry for A2A communication graphs.
Package a2a provides connection registry for A2A communication graphs.
pkg/cache
Package cache provides tool result caching for LLM agent tool execution.
Package cache provides tool result caching for LLM agent tool execution.
pkg/dashboard
Package dashboard provides a real-time web UI for monitoring crew execution via SSE.
Package dashboard provides a real-time web UI for monitoring crew execution via SSE.
pkg/guardrail
Package guardrail provides output validation guardrails for AI agent responses.
Package guardrail provides output validation guardrails for AI agent responses.
pkg/llm
Package llm provides LLM provider abstractions for DraftCrew.
Package llm provides LLM provider abstractions for DraftCrew.
pkg/mcp
Package mcp provides a thread-safe registry for discovered MCP tools.
Package mcp provides a thread-safe registry for discovered MCP tools.
pkg/sandbox
Package sandbox provides sandboxed code execution via WASM (wazero) or Docker.
Package sandbox provides sandboxed code execution via WASM (wazero) or Docker.
pkg/yamlconfig
Package yamlconfig parses DraftCrew YAML configuration files into Go structs.
Package yamlconfig parses DraftCrew YAML configuration files into Go structs.
telemetry module

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL