Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 0 additions & 54 deletions .githooks/pre-commit

This file was deleted.

6 changes: 3 additions & 3 deletions .github/workflows/go-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: '1.24'
go-version: "1.24"
cache: true

- name: golangci-lint
Expand All @@ -57,7 +57,7 @@ jobs:
timeout-minutes: 10
strategy:
matrix:
go-version: ['1.24']
go-version: ["1.24"]
steps:
- name: Checkout code
uses: actions/checkout@v4
Expand Down Expand Up @@ -94,7 +94,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: '1.24'
go-version: "1.24"
cache: true

- name: Run tests
Expand Down
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -207,3 +207,8 @@ article-writer-web-service/
# claude
.claude/
*_PLAN.md

# lwmacct conventions
.local/
.taskfile/
Taskfile.yml
2 changes: 1 addition & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version: "2"
run:
timeout: 5m
tests: true
go: '1.21'
go: "1.21"

linters:
enable:
Expand Down
3 changes: 2 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ repos:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
args: [--allow-multiple-documents]
- id: check-added-large-files
args: ['--maxkb=1000']
args: ["--maxkb=1000"]
- id: check-merge-conflict
4 changes: 4 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"tabWidth": 2,
"printWidth": 256
}
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,30 @@
## [v0.15.0] - 2025-11-24

### Added

- 完成15个工具的全面测试验证
- 添加工具测试文档和报告

### Fixed

- **WebSearch工具**: 修复search_depth参数问题,从"general"改为"basic"以符合Tavily API规范
- 验证多轮推理功能正常工作(streaming.go)

### Tested

- 网络工具: HttpRequest ✅, WebSearch ✅
- 文件工具: Read ✅, Write ✅, Edit ✅, Glob ✅, Grep ✅
- 执行工具: Bash ✅, BashOutput ✅, KillShell ✅
- 任务管理: TodoWrite ✅, Task ✅, ExitPlanMode ✅
- 高级工具: DemoLongTask ✅, Skill ⚠️, SemanticSearch ⚠️

### Notes

- Skill和SemanticSearch工具需要额外配置才能完整使用
- 所有核心工具调用功能已验证正常
- 系统可投入实际使用

## [v0.14.0] - Previous Release

- 基础工具实现
- 多轮推理支持
7 changes: 0 additions & 7 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,44 +68,37 @@ Aster is an event-driven AI Agent framework built with Go, implementing the Goog
### Key Components

1. **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

2. **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

3. **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

4. **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

5. **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

6. **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

7. **Multi-Agent Collaboration** (`pkg/stars/`)

- Stars pattern for agent collaboration
- Scheduler for intelligent task distribution
- Permission management system
Expand Down
54 changes: 34 additions & 20 deletions README_EN.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
**Aster** (星尘云枢) is a production-ready AI Agent development framework built with Go, designed to run agents safely and efficiently in enterprise environments.

Like stardust converging to form a celestial hub, Aster brings together:

- **High Performance**: Go's concurrency model supports 100+ concurrent agents
- **Native Script Execution**: Run Python, TypeScript, and Bash natively with full sandbox isolation
- **Event-Driven Architecture**: Progress/Control/Monitor tri-channel design for clear separation of concerns
Expand All @@ -29,33 +30,39 @@ Like stardust converging to form a celestial hub, Aster brings together:
## 🎯 Core Features

### 🚀 Multi-Language Script Execution

- **Python**: Execute data processing, ML workflows, and analytics scripts
- **TypeScript**: Run modern JavaScript/TypeScript for web automation and API interactions
- **TypeScript**: Run modern JavaScript/TypeScript for web automation and API interactions
- **Bash**: Shell commands for system operations and DevOps tasks
- All with **native performance** and **isolated sandbox environments**

### 🎪 Event-Driven Architecture

- **Progress Channel**: Real-time text streaming, tool execution progress
- **Control Channel**: Tool approval requests, human-in-the-loop interactions
- **Monitor Channel**: Governance events, error tracking, audit logs

### 🧅 Middleware Onion Model

- **Layered Processing**: Requests and responses flow through middleware layers
- **Built-in Middlewares**: Auto-summarization, PII redaction, tool interception
- **Extensible**: Create custom middleware for your specific needs

### 🔒 Enterprise-Grade Security

- **Cloud Sandbox**: Native integration with Aliyun AgentBay, Volcengine
- **PII Auto-Redaction**: Detect and redact 10+ types of sensitive data
- **Permission System**: Fine-grained tool-level access control
- **Audit Logging**: Complete tool call tracking and state management

### 🧠 Three-Layer Memory System

- **Text Memory**: File-based short-term memory for conversation context
- **Working Memory**: Persistent state across sessions with TTL and JSON schema
- **Semantic Memory**: Vector-based long-term memory with provenance tracking

### 🔄 Advanced Capabilities

- **Streaming API**: iter.Seq2-based streaming with 80%+ memory reduction
- **Long-Running Tools**: Async task management with progress tracking
- **Multi-Agent Orchestration**: Pool/Room/Workflow collaboration patterns
Expand Down Expand Up @@ -91,7 +98,7 @@ func main() {
// 1. Setup dependencies
toolRegistry := tools.NewRegistry()
builtin.RegisterAll(toolRegistry)

jsonStore, _ := store.NewJSONStore("./.aster")
deps := &agent.Dependencies{
Store: jsonStore,
Expand Down Expand Up @@ -162,13 +169,15 @@ func main() {
![Middleware Onion](https://raw.githubusercontent.com/astercloud/aster/main/docs/public/images/middleware-onion.svg)

The middleware architecture processes each request/response through multiple layers:

- Higher priority middleware sits in outer layers
- Handles requests first, processes responses last
- Clean separation of concerns and easy extensibility

## 🌐 Multi-Language Execution

### Python Script Example

```python
# agent can execute this directly
import pandas as pd
Expand All @@ -179,18 +188,20 @@ print(result.to_json())
```

### TypeScript Example

```typescript
// Native TypeScript execution
interface User {
name: string;
email: string;
}

const users: User[] = await fetch('/api/users').then(r => r.json());
console.log(users.map(u => u.name));
const users: User[] = await fetch("/api/users").then((r) => r.json());
console.log(users.map((u) => u.name));
```

### Bash Example

```bash
# System operations
find . -name "*.log" -mtime +7 -delete
Expand All @@ -203,15 +214,16 @@ docker ps | grep running

### Completed Phases

✅ **Phase 1**: Foundation (Event system, Sandbox abstraction, Storage)
✅ **Phase 2**: Agent Runtime (Message processing, Tool system, Streaming)
✅ **Phase 3**: Cloud Integration (MCP, Aliyun, Volcengine)
✅ **Phase 4**: Multi-Agent (Pool, Room, Scheduler, Permissions)
✅ **Phase 5**: MCP Support (Protocol, Servers, Tools)
✅ **Phase 6**: Advanced Features (Commands, Skills, Middleware, Multi-provider)
✅ **Phase 1**: Foundation (Event system, Sandbox abstraction, Storage)
✅ **Phase 2**: Agent Runtime (Message processing, Tool system, Streaming)
✅ **Phase 3**: Cloud Integration (MCP, Aliyun, Volcengine)
✅ **Phase 4**: Multi-Agent (Pool, Room, Scheduler, Permissions)
✅ **Phase 5**: MCP Support (Protocol, Servers, Tools)
✅ **Phase 6**: Advanced Features (Commands, Skills, Middleware, Multi-provider)
✅ **Phase 7**: ADK Alignment (Streaming, OpenTelemetry, Persistence, Workflows)

**Current Stats**:

- ~18,000+ LOC
- 25+ new modules
- 80%+ test coverage
Expand All @@ -221,16 +233,16 @@ docker ps | grep running

Aster fully implements the **Google Context Engineering** whitepaper's 8 core capabilities:

| Capability | Status | Description |
|------------|--------|-------------|
| Sessions & Memory | ✅ | Three-layer memory system (Text/Working/Semantic) |
| Memory Provenance | ✅ | Source tracking with confidence scoring |
| Memory Consolidation | ✅ | LLM-driven intelligent memory merging |
| PII Auto-Redaction | ✅ | Automated privacy data protection |
| Event-Driven Architecture | ✅ | Progress/Control/Monitor tri-channel |
| Streaming & Backpressure | ✅ | iter.Seq2 streaming interface |
| Multi-Agent Orchestration | ✅ | Pool/Room/Workflow patterns |
| Observability | ✅ | Complete OpenTelemetry integration |
| Capability | Status | Description |
| ------------------------- | ------ | ------------------------------------------------- |
| Sessions & Memory | ✅ | Three-layer memory system (Text/Working/Semantic) |
| Memory Provenance | ✅ | Source tracking with confidence scoring |
| Memory Consolidation | ✅ | LLM-driven intelligent memory merging |
| PII Auto-Redaction | ✅ | Automated privacy data protection |
| Event-Driven Architecture | ✅ | Progress/Control/Monitor tri-channel |
| Streaming & Backpressure | ✅ | iter.Seq2 streaming interface |
| Multi-Agent Orchestration | ✅ | Pool/Room/Workflow patterns |
| Observability | ✅ | Complete OpenTelemetry integration |

**100% Implementation** - First Go framework to fully implement the standard.

Expand All @@ -239,11 +251,13 @@ Aster fully implements the **Google Context Engineering** whitepaper's 8 core ca
Aster builds upon the excellent work of the open-source community:

### Frameworks

- **[LangChain](https://github.com/langchain-ai/langchain)**: Pioneering agent framework
- **[Google ADK](https://github.com/google/genkit)**: Enterprise-grade agent toolkit
- **[Claude Agent SDK](https://github.com/anthropics/anthropic-sdk-python)**: Computer Use & MCP reference

### Research

Special thanks to the **[Google Context Engineering Whitepaper](https://cloud.google.com/blog/products/ai-machine-learning/context-engineering-for-ai-agents)** for defining agent capabilities and best practices.

## 📄 License
Expand Down
Loading