aster
CLAUDE.md64 starsChanged 11 months agoMITView on GitHub
Aster is an event-driven AI Agent framework built with Go, implementing the Google Context Engineering standards with an onion-model middleware system. The core is built around three distinct event channels: Multi-provider LLM support through a unified interface:
In this repositoryOne other file it gives its agents.
- AGENTS.mdAGENTS.md
The file
We split this CLAUDE.md into the rules it gives an agent
2 rules. About 0 are common, 2 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 150
Use dependency injection extensively:
- Distinctive: line 178
All code execution in sandboxed environments
≈ “Common” is an estimate: at least 1 in 5 of the 12,729 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
AI Agent
This file provides guidance to AI Agent when working with code in this repository.
Essential Commands
Building
# Build both main applications
go build -v ./cmd/aster
go build -v ./cmd/aster-server
# Build with version info
go build -ldflags "-X main.version=$(git describe --tags --always)" ./cmd/asterTesting
# Run all tests
go test -v ./pkg/...
# Run tests without race detection (CI default)
go test -v -short ./pkg/...
# Run specific package tests
go test -v ./pkg/agent
go test -v ./pkg/workflow
go test -v ./pkg/session
# Run integration tests (requires Docker)
go test -v ./test/integration/Linting
# Run golangci-lint (current CI configuration)
golangci-lint run --disable=errcheck --enable=govet,ineffassign,staticcheck,unused ./pkg/...
# Run with default settings (local development)
golangci-lint run ./pkg/...Code Quality
# Format code
go fmt ./...
# Vet code
go vet ./...
# Tidy dependencies
go mod tidy
# Download dependencies
go mod downloadArchitecture Overview
Core Architecture
Aster is an event-driven AI Agent framework built with Go, implementing the Google Context Engineering standards with an onion-model middleware system.
Key Components
- Agent System (
pkg/agent/)- Core agent implementation with event-driven architecture
- Three event channels: Progress (real-time output), Control (human interaction), Monitor (governance)
- Dependencies injection pattern with Registry pattern for tools and templates
- Workflow Engine (
pkg/workflow/)- Sequential, Parallel, and Loop workflow agents
- 8-step types with Router for dynamic routing
- Stream-based execution with Go 1.23 iter.Seq2
- Memory Management (
pkg/memory/)- Three-tier system: Text Memory, Working Memory, Semantic Memory
- Advanced features: Provenance (source tracking), Consolidation (LLM-driven merging), PII Auto-Redaction
- Vector store integration with confidence scoring
- Middleware System (
pkg/middleware/)- Onion-model architecture with priority-based layers
- Built-in middlewares: filesystem, summarization, agent memory, working memory
- Custom middleware support via WrapModelCall/WrapToolCall interfaces
- Tools System (
pkg/tools/)- Registry pattern for tool discovery and management
- Built-in tools: filesystem operations, bash execution, HTTP requests, web search, todo management
- MCP (Model Context Protocol) support for external tool integration
- Long-running tools with async execution and progress tracking
- Session & Persistence (
pkg/session/)- PostgreSQL and MySQL support with JSONB/JSON columns
- Event sourcing with append-only storage
- 7-point recovery mechanism for fault tolerance
- Multi-Agent Collaboration (
pkg/stars/)- Stars pattern for agent collaboration
- Scheduler for intelligent task distribution
- Permission management system
- Sandbox Security (
pkg/sandbox/)- Local, Docker, Aliyun AgentBay, and Volcengine sandbox backends
- Process isolation and resource limits
- Security audit logging
Event-Driven Architecture
The core is built around three distinct event channels:
- Progress Channel: Stream text chunks, tool execution progress (UI/Chat consumers)
- Control Channel: Tool approval requests, user confirmations (Human-in-the-loop systems)
- Monitor Channel: Governance events, errors, audit logs (Monitoring/Compliance systems)
Provider Abstraction
Multi-provider LLM support through a unified interface:
- Anthropic Claude (primary)
- OpenAI GPT
- DeepSeek
- Other OpenAI-compatible providers
Data Flow
- Agent receives input → Subscribe to event channels
- Request flows through middleware onion (pre-processing)
- LLM provider processes with tool calling
- Tool execution in secure sandbox
- Response flows back through middleware (post-processing)
- Events published to appropriate channels
- Session persistence stores conversation history
Development Guidelines
Project Structure
cmd/: Main applications (aster, aster-server)pkg/: Core library packagesexamples/: Usage examples and demosdocs/: Documentation and architecture guidestest/: Integration and performance tests
Dependencies Pattern
Use dependency injection extensively:
deps := &agent.Dependencies{
Store: store,
SandboxFactory: sandboxFactory,
ToolRegistry: toolRegistry,
ProviderFactory: providerFactory,
TemplateRegistry: templateRegistry,
}Testing Strategy
- Unit tests:
*_test.gofiles alongside source code - Integration tests:
test/integration/with Docker containers - CI uses
-shortflag to skip long-running tests - Race detection disabled in CI for performance
Performance Considerations
- Streaming responses use iter.Seq2 for O(1) memory
- Long-running tools support async execution
- Session persistence optimized with JSON columns
- Resource limits enforced via GOMAXPROCS and GOMEMLIMIT
Security Model
- All code execution in sandboxed environments
- Tool-level permissions with allow/deny/ask policies
- PII auto-redaction for sensitive data
- Complete audit trail for tool executions
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

