simon

package module
v0.0.0-...-4cd4b9b Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2026 License: MIT Imports: 18 Imported by: 0

README

simon-go

Go port of "Simon SDK," a lightweight AI agent framework originally written in Python. There is no separate migration-plan document — design rationale for hard-to-port Python idioms (reflection-based tool schemas, contextvars, dual sync/async APIs, dual-inheritance exceptions, pickle/numpy knowledge index) lives inline in package doc comments, and is indexed in docs/.

Quick start

cp .env.example .env   # add an API key, or point OLLAMA_HOST at a local server
go build ./...
go run ./cmd/simon chat

See docs/configuration.md for every environment variable, and docs/examples.md for ~15 runnable programs demonstrating individual features.

SDK

Simon is a reusable Go module (github.com/LuisKeys/simon) as well as a runnable CLI: a host application embeds the public simon/model/tool/ memory/knowledge/pkg/simonerr packages without ever importing anything under internal/.

Installation
go get github.com/LuisKeys/simon@latest
Minimal example
package main

import (
	"context"
	"fmt"
	"log"

	simon "github.com/LuisKeys/simon"
	"github.com/LuisKeys/simon/model"
)

func main() {
	runtime, err := simon.New(
		simon.WithModel(model.EchoModel{}),
	)
	if err != nil {
		log.Fatal(err)
	}
	defer runtime.Close()

	session, err := runtime.NewSession(
		"example",
		simon.WithSystemPrompt("You are a local personal assistant."),
	)
	if err != nil {
		log.Fatal(err)
	}
	defer session.Close()

	response, err := session.Run(
		context.Background(),
		"Hello Simon",
	)
	if err != nil {
		log.Fatal(err)
	}

	fmt.Println(response.Text)
}
Public packages
Package Purpose
simon Runtime, sessions, events, approvals and configuration
model Model-provider contract
tool Typed and runtime-defined tools
memory Conversation persistence contracts and implementations
knowledge Retrieval and embedding contracts
simonerr Public error hierarchy

See docs/public-sdk.md for the full facade reference, and examples/public_* for ten runnable programs covering tools, tool approval, memory, knowledge, events, streaming, structured output, custom models, and parallel sessions.

Development from another local repository

To iterate on Simon and a consumer repository together, use a go.work workspace so changes are picked up without publishing a release:

mkdir simon-workspace
cd simon-workspace

git clone git@github.com:LuisKeys/simon.git
git clone <consumer-repository>

go work init ./simon ./<consumer-directory>

Alternatively, a consumer-only replace directive works without a workspace:

replace github.com/LuisKeys/simon => ../simon

A local replace directive like this must stay in the consumer's go.mod only — it must never be published in Simon's own root go.mod.

Documentation

Commands

  • Build: go build ./...
  • Test all: go test ./...
  • Single test: go test -run TestName ./internal/pkg/...
  • Race-sensitive pipeline test: go test -race ./internal/pipeline/...
  • Vet: go vet ./... (no golangci-lint or other configured linter; no Makefile, no CI workflow)
  • Run the CLI: go run ./cmd/simon chat|ask|index|plan|knowledge

Status

Phase 0 (foundation) in progress: pkg/simonerr, internal/config, internal/reliability, internal/router, internal/agent/response.

Phase 1 (core execution) complete: internal/model (+ openai/anthropic/ollama providers), internal/tool (registration + ToolRunner), internal/memory, internal/agent (ReAct loop + structured output), internal/multi (Group/Pool/Triage).

Phase 2 (knowledge) complete: internal/knowledge/embed (OpenAI/Ollama/Voyage embedding providers), internal/knowledge/index (from-scratch SIDX binary format replacing Python's pickle+numpy), internal/knowledge/extract (pdf/docx/xlsx/pptx text extraction), internal/knowledge (chunking + KnowledgeBase), wired into internal/agent as an optional knowledge-context system message via the KnowledgeSearcher interface.

Phase 3 (surface) complete: internal/mcp (official MCP Go SDK, stdio client), internal/planner (goal decomposition + sequential execution), internal/tui (terminal chat: Markdown→ANSI rendering + /quit /clear — line-based input via bufio.Scanner rather than raw-mode tab-completion, a deliberate simplification), cmd/simon (chat/ask/index/plan CLI via the stdlib flag package). The binary builds and runs end-to-end against a real local Ollama server.

Phase 4 (activity pipeline) complete: internal/events (EventBus pub/sub + SQLite-backed Store + EventCompressor), internal/privacy (deny-by-default PermissionManager, audited via the event bus), internal/activity (ActivityStore query layer, ContextEngine, activity transition graph), internal/habits (n-gram habit mining over session history), internal/semantic (LLM-based activity classification, local Ollama only by design), internal/sensors (Sensor/Manager lifecycle — macOS sensors themselves are out of scope for this port; see package doc). internal/pipeline has an end-to-end test wiring a synthetic sensor through the full chain (sensor -> bus -> semantic -> session compression -> activity store -> graph -> habit discovery), verified clean under -race.

Knowledge Router complete: internal/knowledge/router — a second, embeddings-free agent.KnowledgeSearcher backend that routes queries through curated category/document/section YAML metadata instead of a vector index, reusing internal/knowledge/extract for source reads. Selected via KNOWLEDGE_MODE=router; exposed through simon knowledge build|validate|tree|search. The default KNOWLEDGE_MODE remains vector, so simon index and the existing internal/knowledge KnowledgeBase are unchanged. See docs/knowledge-base.md.

Public SDK facade complete: simon (Runtime/Session), model, tool, knowledge, memory — an embeddable public surface wrapping internal/agent for host applications, so a consumer never has to import anything under internal/. 10 runnable examples under examples/public_* plus matching .vscode/launch.json entries demonstrate tools, memory, knowledge, streaming, cancellation, tool approval, structured output, parallel sessions, and desktop event forwarding. See docs/public-sdk.md.

Documentation

Overview

Package simon is the public facade for embedding Simon in another Go application: a Runtime holds shared resources (settings, provider selection, tool registry, memory/knowledge attachments, event dispatch), and each Session is one independent conversation or task run against it.

Public types here (Response, Event, Usage, ...) intentionally do not alias internal/agent/response's types even where the shapes currently match: internal packages are free to change shape without that silently changing this package's contract. See internal/agent's package doc for why the agent loop itself doesn't offer an async variant — Runtime and Session follow the same rule (callers wanting concurrency use goroutines, not a parallel API).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RunStructured

func RunStructured[T any](ctx context.Context, s *Session, prompt string) (T, error)

RunStructured runs prompt like Session.Run, but parses the model's reply into T (via a JSON-schema instruction and retries on invalid JSON, matching internal/agent.RunStructured's behavior). On exhaustion, the returned error is a *simonerr.StructuredOutputError (recoverable via errors.As), carrying the raw text and attempt count.

Types

type AllowAll

type AllowAll struct{}

AllowAll is the default ApprovalPolicy: every tool call is permitted without prompting.

func (AllowAll) Approve

Approve implements ApprovalPolicy.

type ApprovalPolicy

type ApprovalPolicy interface {
	// Approve returns true to allow the call, false (with a nil error) to
	// deny it silently, or a non-nil error to deny it and surface why.
	Approve(ctx context.Context, request ApprovalRequest) (bool, error)
}

ApprovalPolicy gates tool execution, giving desktop/interactive applications a hook to require human confirmation before a sensitive tool call runs.

type ApprovalRequest

type ApprovalRequest struct {
	SessionID string
	ToolName  string
	Arguments json.RawMessage
}

ApprovalRequest describes a tool call awaiting an approval decision.

type Event

type Event struct {
	Type      EventType
	RuntimeID string
	SessionID string
	RunID     string
	Timestamp time.Time
	Data      any
}

Event is a single point-in-time occurrence during a Session run.

type EventHandler

type EventHandler func(context.Context, Event)

EventHandler observes every Event a Runtime's sessions emit. A handler that panics or is slow must never destabilize a run: Runtime always invokes handlers through a recover-guarded call.

type EventType

type EventType string

EventType identifies a point in a run's lifecycle.

const (
	EventRunStarted     EventType = "run.started"
	EventModelSelected  EventType = "model.selected"
	EventResponseDelta  EventType = "response.delta"
	EventToolRequested  EventType = "tool.requested"
	EventToolStarted    EventType = "tool.started"
	EventToolCompleted  EventType = "tool.completed"
	EventToolFailed     EventType = "tool.failed"
	EventRetryAttempted EventType = "retry.attempted"
	EventRunCompleted   EventType = "run.completed"
	EventRunFailed      EventType = "run.failed"
	EventRunCancelled   EventType = "run.cancelled"
)

type MemoryFactory

type MemoryFactory = memory.Factory

MemoryFactory builds a Memory for a given session, letting each Session obtain independent storage.

type ModelRouter

type ModelRouter interface {
	Resolve(ctx context.Context, modelLabel, task string) (provider, modelName string)
}

ModelRouter selects a provider/model pair for a run. Implement this to customize provider selection instead of using Simon's built-in heuristics (env-configured providers + task-complexity keywords).

Routing decisions from a custom ModelRouter are resolved once per Session (at NewSession), not per prompt — Simon's own default router already resolves per-prompt when no custom Model/ModelRouter is set, so this only affects the advanced case of a caller-supplied router.

type Option

type Option func(*Runtime) error

Option configures a Runtime at construction time.

func WithApprovalPolicy

func WithApprovalPolicy(policy ApprovalPolicy) Option

WithApprovalPolicy attaches a policy every registered tool call is checked against before it executes. The default policy (AllowAll) permits every call.

func WithEnvironment

func WithEnvironment() Option

WithEnvironment loads settings from the process environment (and a ".env" file in the working directory, if present) — the same source cmd/simon uses. This is the default even with no options at all; passing it explicitly documents intent and lets it be combined with WithSettings (which takes precedence field-by-field).

func WithEventHandler

func WithEventHandler(handler EventHandler) Option

WithEventHandler attaches a handler invoked for every Event emitted by any Session this Runtime creates. Handler panics/errors are recovered and never affect the run that triggered them.

func WithKnowledgeBase

func WithKnowledgeBase(kb knowledge.Searcher) Option

WithKnowledgeBase attaches a knowledge base every Session searches by default (a Session can override it via WithSessionKnowledge).

func WithLogger

func WithLogger(logger *slog.Logger) Option

WithLogger attaches a structured logger. Without one, Runtime uses a silent (slog.DiscardHandler) logger — errors are still returned normally, nothing is printed.

func WithMaxConcurrentRuns

func WithMaxConcurrentRuns(limit int) Option

WithMaxConcurrentRuns caps how many Session runs may execute concurrently across the whole Runtime. Zero (the default) means unlimited.

func WithMemoryFactory

func WithMemoryFactory(factory MemoryFactory) Option

WithMemoryFactory attaches a MemoryFactory so every Session gets its own Memory instance at construction time.

func WithModel

func WithModel(m model.Model) Option

WithModel pins every session created by this Runtime to a single custom Model implementation, bypassing router-based provider selection entirely.

func WithRouter

func WithRouter(router ModelRouter) Option

WithRouter replaces Simon's default provider-selection heuristics with a custom ModelRouter.

func WithSettings

func WithSettings(settings Settings) Option

WithSettings applies explicit settings on top of whatever base settings are already loaded (environment by default). Fields left at their zero value keep the base's value, so WithSettings can be used to override just one or two fields.

func WithToolRegistry

func WithToolRegistry(registry *tool.Registry) Option

WithToolRegistry replaces the Runtime's tool registry outright, instead of registering tools one at a time via RegisterTool/RegisterTools.

type Response

type Response struct {
	Text       string
	Usage      Usage
	ToolCalls  []ToolCall
	Steps      int
	Model      string
	Provider   string
	StopReason StopReason
	Metadata   map[string]any
}

Response is the result of Session.Run/RunStructured. It is a distinct type from internal/agent/response.AgentResponse (even though the shapes currently overlap) so internal refactors can't silently change the public contract.

type Runtime

type Runtime struct {
	// contains filtered or unexported fields
}

Runtime holds resources shared across every Session it creates: settings, provider/router selection, the tool registry, the approval policy, event dispatch, and lifecycle. Safe for concurrent use.

func New

func New(opts ...Option) (*Runtime, error)

New builds a Runtime. With no options, settings are loaded from the environment (equivalent to WithEnvironment()).

func (*Runtime) Close

func (rt *Runtime) Close() error

Close cancels every active run and closes every Session this Runtime created. Idempotent: calling it more than once is a no-op after the first call.

func (*Runtime) NewSession

func (rt *Runtime) NewSession(id string, opts ...SessionOption) (*Session, error)

NewSession creates an independent Session bound to this Runtime's shared resources. Multiple Sessions may run concurrently.

func (*Runtime) RegisterTool

func (rt *Runtime) RegisterTool(t tool.Tool) error

RegisterTool adds a single tool to the Runtime's shared registry. Tools registered here are available to every Session created afterward; Sessions already created keep the tool set they were built with.

func (*Runtime) RegisterTools

func (rt *Runtime) RegisterTools(tools ...tool.Tool) error

RegisterTools registers multiple tools; see RegisterTool.

type Session

type Session struct {
	// contains filtered or unexported fields
}

Session represents one independent conversation or task run against a Runtime's shared resources: its own history, its own active-run state, its own event stream. A Runtime may host many concurrent Sessions; within a single Session, only one Run/Stream/RunStructured may be active at a time — a second call while one is in flight returns simonerr.ErrSessionBusy.

func (*Session) Cancel

func (s *Session) Cancel()

Cancel cancels this session's active run, if any. It is a no-op if no run is active.

func (*Session) Clear

func (s *Session) Clear(ctx context.Context) error

Clear erases this session's memory, if it has any.

func (*Session) Close

func (s *Session) Close() error

Close cancels any active run, closes this session's exclusive memory (if any), and marks it closed. Idempotent.

func (*Session) ID

func (s *Session) ID() string

ID returns the session identifier passed to Runtime.NewSession.

func (*Session) Run

func (s *Session) Run(ctx context.Context, prompt string) (Response, error)

Run executes prompt through the ReAct loop and returns once it completes, fails, or is cancelled.

func (*Session) Stream

func (s *Session) Stream(ctx context.Context, prompt string) (<-chan Event, error)

Stream executes prompt like Run, but returns immediately with a read-only channel of Events instead of waiting for the final Response. The channel closes once the run completes, fails, or is cancelled; the final event is always delivered even if earlier events were dropped for buffer space.

type SessionOption

type SessionOption func(*sessionConfig)

SessionOption configures a Session at construction time.

func WithMaxSteps

func WithMaxSteps(n int) SessionOption

WithMaxSteps overrides the maximum number of ReAct tool-call steps for this session.

func WithSessionKnowledge

func WithSessionKnowledge(kb knowledge.Searcher) SessionOption

WithSessionKnowledge overrides the Runtime's default knowledge base for this session only.

func WithSystemPrompt

func WithSystemPrompt(prompt string) SessionOption

WithSystemPrompt sets the session's system prompt.

type Settings

type Settings struct {
	DefaultModel string

	OpenAIAPIKey    string
	OpenAIModel     string
	AnthropicAPIKey string
	AnthropicModel  string
	OllamaHost      string
	OllamaModel     string

	KnowledgeStorePath string
	EmbeddingProvider  string
	EmbeddingModel     string

	MaxRetries        int
	RequestTimeout    float64
	RetryBaseDelay    float64
	StructuredRetries int
}

Settings is the subset of Simon's environment-backed configuration relevant to an embedding application. It is a hand-maintained parallel of internal/config.Settings (not a type alias): CLI-only fields (activity store path, sensor poll interval, directory-enable flags) stay internal, and any internal renumbering/renaming can't silently change this public contract. Zero-value fields fall back to config.Load()'s defaults.

type StopReason

type StopReason string

StopReason describes why a run stopped producing more tool calls.

type ToolCall

type ToolCall struct {
	ID        string
	Name      string
	Arguments map[string]any
}

ToolCall is a single tool invocation the model requested during a run.

type Usage

type Usage struct {
	InputTokens  int
	OutputTokens int
	TotalTokens  int
}

Usage tracks token consumption for a Run.

Directories

Path Synopsis
cmd
simon command
Command simon is Simon SDK's command-line interface, mirroring Python's simon/cli.py (chat | ask | index | plan).
Command simon is Simon SDK's command-line interface, mirroring Python's simon/cli.py (chat | ask | index | plan).
examples
activity_pipeline_example command
Command activity_pipeline_example mirrors Python's examples/activity_pipeline_example.py — the local-first activity observation pipeline (Fases 0-4).
Command activity_pipeline_example mirrors Python's examples/activity_pipeline_example.py — the local-first activity observation pipeline (Fases 0-4).
agent_pool_example command
Command agent_pool_example mirrors Python's examples/agent_pool_example.py — run three specialized agents in parallel, each on a different task, via multi.Pool.
Command agent_pool_example mirrors Python's examples/agent_pool_example.py — run three specialized agents in parallel, each on a different task, via multi.Pool.
basic_agent command
Command basic_agent mirrors Python's examples/basic_agent.py — the smallest possible Simon agent: build one with defaults and run a prompt.
Command basic_agent mirrors Python's examples/basic_agent.py — the smallest possible Simon agent: build one with defaults and run a prompt.
builtin_tools_agent command
Command builtin_tools_agent mirrors Python's examples/builtin_tools_agent.py — running an agent's built-in tools directly via the "tool:name {json_args}" shorthand.
Command builtin_tools_agent mirrors Python's examples/builtin_tools_agent.py — running an agent's built-in tools directly via the "tool:name {json_args}" shorthand.
chat_tui command
Command chat_tui mirrors Python's examples/chat_tui.py — an interactive terminal chat with a named, personality-driven agent.
Command chat_tui mirrors Python's examples/chat_tui.py — an interactive terminal chat with a named, personality-driven agent.
hooks_agent command
Command hooks_agent mirrors Python's examples/hooks_agent.py — observability hooks and usage tracking via agent.WithOnEvent.
Command hooks_agent mirrors Python's examples/hooks_agent.py — observability hooks and usage tracking via agent.WithOnEvent.
knowledge_agent command
Command knowledge_agent mirrors Python's examples/knowledge_agent.py — index a PDF into the knowledge base, then ask the agent questions that can only be answered from that document.
Command knowledge_agent mirrors Python's examples/knowledge_agent.py — index a PDF into the knowledge base, then ask the agent questions that can only be answered from that document.
knowledge_router_agent command
Command knowledge_router_agent demonstrates Knowledge Router: a hierarchical, lexical, embeddings-free alternative to Simon's vector KnowledgeBase.
Command knowledge_router_agent demonstrates Knowledge Router: a hierarchical, lexical, embeddings-free alternative to Simon's vector KnowledgeBase.
mcp_agent command
Command mcp_agent mirrors Python's examples/mcp_agent.py — using tools from an MCP server inside a Simon agent.
Command mcp_agent mirrors Python's examples/mcp_agent.py — using tools from an MCP server inside a Simon agent.
mcp_agent/server command
Command server is a standalone MCP stdio server used by examples/mcp_agent, mirroring Python's simon/tools/builtin/mcp_example_server.py.
Command server is a standalone MCP stdio server used by examples/mcp_agent, mirroring Python's simon/tools/builtin/mcp_example_server.py.
memory_agent command
Command memory_agent mirrors Python's examples/memory_agent.py — demonstrates conversation memory across two sequential Run calls.
Command memory_agent mirrors Python's examples/memory_agent.py — demonstrates conversation memory across two sequential Run calls.
parallel_agents command
Command parallel_agents mirrors Python's examples/parallel_agents.py — run three specialized agents in parallel over the same prompt via multi.Group.RunAll.
Command parallel_agents mirrors Python's examples/parallel_agents.py — run three specialized agents in parallel over the same prompt via multi.Group.RunAll.
persistent_memory_agent command
Command persistent_memory_agent mirrors Python's examples/persistent_memory_agent.py — one JSON file == one conversation.
Command persistent_memory_agent mirrors Python's examples/persistent_memory_agent.py — one JSON file == one conversation.
planner_agent command
Command planner_agent mirrors Python's examples/planner_agent.py — decompose a goal into tasks and run each one.
Command planner_agent mirrors Python's examples/planner_agent.py — decompose a goal into tasks and run each one.
public_basic_agent command
Command public_basic_agent is the smallest possible consumer of the public simon SDK: build a Runtime, open a Session, run a prompt.
Command public_basic_agent is the smallest possible consumer of the public simon SDK: build a Runtime, open a Session, run a prompt.
public_cancellation command
Command public_cancellation demonstrates Session.Cancel: a slow scripted Model is interrupted mid-flight, and the resulting event stream ends with run.cancelled instead of run.completed.
Command public_cancellation demonstrates Session.Cancel: a slow scripted Model is interrupted mid-flight, and the resulting event stream ends with run.cancelled instead of run.completed.
public_desktop_wails command
Command public_desktop_wails shows the event-forwarding pattern a desktop application built with Wails (https://wails.io) would use to pipe simon.Event values into its frontend.
Command public_desktop_wails shows the event-forwarding pattern a desktop application built with Wails (https://wails.io) would use to pipe simon.Event values into its frontend.
public_knowledge command
Command public_knowledge demonstrates attaching a knowledge base to a Runtime and surfacing a retrieved hit through a Session.Run call, using a scripted Model so the run is deterministic and needs no embedding API.
Command public_knowledge demonstrates attaching a knowledge base to a Runtime and surfacing a retrieved hit through a Session.Run call, using a scripted Model so the run is deterministic and needs no embedding API.
public_memory command
Command public_memory demonstrates attaching persistent memory to a Session via a MemoryFactory, and shows history surviving across multiple Run calls on the same session.
Command public_memory demonstrates attaching persistent memory to a Session via a MemoryFactory, and shows history surviving across multiple Run calls on the same session.
public_parallel_sessions command
Command public_parallel_sessions demonstrates running multiple Sessions on one Runtime concurrently, and WithMaxConcurrentRuns throttling how many of those runs execute at once.
Command public_parallel_sessions demonstrates running multiple Sessions on one Runtime concurrently, and WithMaxConcurrentRuns throttling how many of those runs execute at once.
public_streaming command
Command public_streaming demonstrates Session.Stream: consuming the <-chan simon.Event as a run progresses instead of waiting for the final Response.
Command public_streaming demonstrates Session.Stream: consuming the <-chan simon.Event as a run progresses instead of waiting for the final Response.
public_structured_output command
Command public_structured_output demonstrates simon.RunStructured: a scripted Model replies with raw JSON (inside markdown fences, to show that fences are stripped), which RunStructured parses into a typed Go struct.
Command public_structured_output demonstrates simon.RunStructured: a scripted Model replies with raw JSON (inside markdown fences, to show that fences are stripped), which RunStructured parses into a typed Go struct.
public_tool_approval command
Command public_tool_approval demonstrates ApprovalPolicy: a custom policy denies a "delete_file" tool call and allows everything else, showing both outcomes without ever touching the filesystem.
Command public_tool_approval demonstrates ApprovalPolicy: a custom policy denies a "delete_file" tool call and allows everything else, showing both outcomes without ever touching the filesystem.
public_tools command
Command public_tools demonstrates registering a typed tool and driving a full tool-call round trip: a scripted Model requests the tool on its first reply, then produces a final answer once given the tool's result.
Command public_tools demonstrates registering a typed tool and driving a full tool-call round trip: a scripted Model requests the tool on its first reply, then produces a final answer once given the tool's result.
run_context_example command
Command run_context_example is an idiomatic Go adaptation of Python's examples/run_context_example.py, NOT a literal port.
Command run_context_example is an idiomatic Go adaptation of Python's examples/run_context_example.py, NOT a literal port.
structured_output_agent command
Command structured_output_agent mirrors Python's examples/structured_output_agent.py — structured output parsed into a typed Recipe struct via agent.RunStructured.
Command structured_output_agent mirrors Python's examples/structured_output_agent.py — structured output parsed into a typed Recipe struct via agent.RunStructured.
tool_runner_example command
Command tool_runner_example mirrors Python's examples/tool_runner_example.py — tool.Runner, Simon's standalone, turn-by-turn tool-use loop.
Command tool_runner_example mirrors Python's examples/tool_runner_example.py — tool.Runner, Simon's standalone, turn-by-turn tool-use loop.
triage_agent command
Command triage_agent mirrors Python's examples/triage_agent.py — a triage agent routes tasks to the right specialist via multi.NewTriage.
Command triage_agent mirrors Python's examples/triage_agent.py — a triage agent routes tasks to the right specialist via multi.NewTriage.
internal
activity
Package activity implements read models over the session stream the events.EventCompressor produces, mirroring Python's simon/activity package (ActivityStore, ContextEngine, ActivityGraphStore/Builder).
Package activity implements read models over the session stream the events.EventCompressor produces, mirroring Python's simon/activity package (ActivityStore, ContextEngine, ActivityGraphStore/Builder).
agent
Package agent implements Simon's ReAct loop, mirroring Python's simon/agent/agent.py Agent.
Package agent implements Simon's ReAct loop, mirroring Python's simon/agent/agent.py Agent.
agent/response
Package response defines the shared Agent/ToolRunner/Multi/Logging result types, mirroring Python's simon/agent/response.py.
Package response defines the shared Agent/ToolRunner/Multi/Logging result types, mirroring Python's simon/agent/response.py.
config
Package config loads environment-backed settings, mirroring Python's simon/config/settings.py (pydantic-settings, .env-backed, ~20 typed fields with defaults).
Package config loads environment-backed settings, mirroring Python's simon/config/settings.py (pydantic-settings, .env-backed, ~20 typed fields with defaults).
events
Package events implements Simon's activity-pipeline pub/sub, mirroring Python's simon/events/bus.py (EventBus, ActivityEvent) and simon/events/compression.py (EventCompressor).
Package events implements Simon's activity-pipeline pub/sub, mirroring Python's simon/events/bus.py (EventBus, ActivityEvent) and simon/events/compression.py (EventCompressor).
habits
Package habits mines the Activity Store for recurring category n-grams, mirroring Python's simon/habits package (Habit, HabitDiscoveryEngine, PatternStore).
Package habits mines the Activity Store for recurring category n-grams, mirroring Python's simon/habits package (Habit, HabitDiscoveryEngine, PatternStore).
knowledge
Package knowledge implements document ingestion + retrieval, mirroring Python's simon/knowledge/knowledge.py KnowledgeBase.
Package knowledge implements document ingestion + retrieval, mirroring Python's simon/knowledge/knowledge.py KnowledgeBase.
knowledge/embed
Package embed implements Simon's embedding providers, mirroring Python's simon/knowledge/embeddings.py.
Package embed implements Simon's embedding providers, mirroring Python's simon/knowledge/embeddings.py.
knowledge/extract
Package extract reads plain text out of pdf/docx/xlsx/pptx/plain-text files, mirroring KnowledgeBase._read_file in Python's simon/knowledge/knowledge.py.
Package extract reads plain text out of pdf/docx/xlsx/pptx/plain-text files, mirroring KnowledgeBase._read_file in Python's simon/knowledge/knowledge.py.
knowledge/index
Package index implements Simon's vector index, replacing Python's pickle+numpy .npy retrieval.py format (simon/knowledge/retrieval.py FileRetriever) with a from-scratch design: no binary compatibility with existing Python .simon_knowledge/ data is preserved or required.
Package index implements Simon's vector index, replacing Python's pickle+numpy .npy retrieval.py format (simon/knowledge/retrieval.py FileRetriever) with a from-scratch design: no binary compatibility with existing Python .simon_knowledge/ data is preserved or required.
knowledge/router
Package router implements Knowledge Router: a hierarchical, lexical, embeddings-free retrieval backend that coexists with Simon's vector KnowledgeBase (internal/knowledge).
Package router implements Knowledge Router: a hierarchical, lexical, embeddings-free retrieval backend that coexists with Simon's vector KnowledgeBase (internal/knowledge).
mcp
Package mcp connects to an MCP server over stdio and exposes its tools as Simon tool.Tool values, mirroring Python's simon/tools/mcp_client.py MCPClient.
Package mcp connects to an MCP server over stdio and exposes its tools as Simon tool.Tool values, mirroring Python's simon/tools/mcp_client.py MCPClient.
memory
Package memory implements pluggable conversation history, mirroring Python's simon/memory package (BaseMemory ABC, InMemoryMemory, JSONFileMemory).
Package memory implements pluggable conversation history, mirroring Python's simon/memory package (BaseMemory ABC, InMemoryMemory, JSONFileMemory).
model
Package model defines the Model interface adapters implement, mirroring Python's simon/models/base.py BaseModel.
Package model defines the Model interface adapters implement, mirroring Python's simon/models/base.py BaseModel.
model/anthropic
Package anthropic adapts the official Anthropic Go SDK to Simon's model.Model interface, mirroring Python's simon/models/anthropic.py.
Package anthropic adapts the official Anthropic Go SDK to Simon's model.Model interface, mirroring Python's simon/models/anthropic.py.
model/ollama
Package ollama adapts the official Ollama Go client to Simon's model.Model interface, mirroring Python's simon/models/ollama.py.
Package ollama adapts the official Ollama Go client to Simon's model.Model interface, mirroring Python's simon/models/ollama.py.
model/openai
Package openai adapts the official OpenAI Go SDK to Simon's model.Model interface, mirroring Python's simon/models/openai.py.
Package openai adapts the official OpenAI Go SDK to Simon's model.Model interface, mirroring Python's simon/models/openai.py.
multi
Package multi implements Simon's multi-agent patterns (AgentGroup, AgentPool, TriageAgent), mirroring Python's simon/multi package.
Package multi implements Simon's multi-agent patterns (AgentGroup, AgentPool, TriageAgent), mirroring Python's simon/multi package.
pipeline
Package pipeline holds end-to-end tests of the activity pipeline (sensor -> bus -> store -> semantic -> activity -> habit) wired together from the individually-tested packages in internal/events, internal/privacy, internal/semantic, internal/activity, and internal/habits.
Package pipeline holds end-to-end tests of the activity pipeline (sensor -> bus -> store -> semantic -> activity -> habit) wired together from the individually-tested packages in internal/events, internal/privacy, internal/semantic, internal/activity, and internal/habits.
planner
Package planner decomposes a goal into an ordered task list via an LLM call, then runs each task through an Agent, mirroring Python's simon/planner/planner.py Planner.
Package planner decomposes a goal into an ordered task list via an LLM call, then runs each task through an Agent, mirroring Python's simon/planner/planner.py Planner.
privacy
Package privacy implements deny-by-default, auditable access control for sensors, mirroring Python's simon/privacy package (PermissionScope, PermissionManager, PermissionStore/SQLitePermissionStore).
Package privacy implements deny-by-default, auditable access control for sensors, mirroring Python's simon/privacy package (PermissionScope, PermissionManager, PermissionStore/SQLitePermissionStore).
reliability
Package reliability provides a generic exponential-backoff/timeout retry helper, mirroring Python's simon/reliability.py with_retry.
Package reliability provides a generic exponential-backoff/timeout retry helper, mirroring Python's simon/reliability.py with_retry.
router
Package router implements lightweight model/provider selection with sensible defaults, mirroring Python's simon/router/router.py ModelRouter.
Package router implements lightweight model/provider selection with sensible defaults, mirroring Python's simon/router/router.py ModelRouter.
semantic
Package semantic classifies raw sensor observations into activity labels, mirroring Python's simon/semantic/extractor.py SemanticEventExtractor.
Package semantic classifies raw sensor observations into activity labels, mirroring Python's simon/semantic/extractor.py SemanticEventExtractor.
sensors
Package sensors defines the Sensor interface and SensorManager, mirroring Python's simon/sensors/base.py.
Package sensors defines the Sensor interface and SensorManager, mirroring Python's simon/sensors/base.py.
tool
Package tool implements Simon's tool registration and JSON-schema generation, mirroring Python's simon/tools/tool.py @tool decorator.
Package tool implements Simon's tool registration and JSON-schema generation, mirroring Python's simon/tools/tool.py @tool decorator.
tui
Package tui implements Simon's terminal chat interface, mirroring Python's simon/tui.py.
Package tui implements Simon's terminal chat interface, mirroring Python's simon/tui.py.
Package knowledge defines the public retrieval-augmented-generation contract consumers of the simon SDK implement or use to attach a knowledge base to a Runtime or Session.
Package knowledge defines the public retrieval-augmented-generation contract consumers of the simon SDK implement or use to attach a knowledge base to a Runtime or Session.
Package memory defines the public conversation-history contract consumers of the simon SDK implement or use to give a Session persistent history.
Package memory defines the public conversation-history contract consumers of the simon SDK implement or use to give a Session persistent history.
Package model defines the public, stable model-provider contract consumers of the simon SDK implement to plug a custom LLM client into a Runtime.
Package model defines the public, stable model-provider contract consumers of the simon SDK implement to plug a custom LLM client into a Runtime.
pkg
simonerr
Package simonerr defines the Simon SDK error hierarchy.
Package simonerr defines the Simon SDK error hierarchy.
Package tool defines the public tool contract consumers of the simon SDK implement to give an agent new capabilities.
Package tool defines the public tool contract consumers of the simon SDK implement to give an agent new capabilities.

Jump to

Keyboard shortcuts

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