enzu
1.0.0
Enzu는 정교한 다중 에이전트 AI 시스템을 구축하기 위해 설계된 선언적 Go 프레임워크입니다. 이를 통해 LLM과 AI 에이전트는 명확한 계층 구조와 통신 패턴을 유지하면서 협업하고, 병렬 작업을 실행하고, 확장 가능한 도구를 활용할 수 있습니다.
// Pattern: Distributed Research System
type ResearchRequest struct {
Topic string `json:"topic"`
Subtopics [] string `json:"subtopics,omitempty"`
MaxResults int `json:"max_results,omitempty"`
TimeoutSecs int `json:"timeout_secs,omitempty"`
}
// Create specialized research agents
researcher := enzu . NewAgent ( "Primary Researcher" ,
"Deep research and fact verification" ,
llm ,
enzu . WithToolLists ( "ResearchTool" ),
enzu . WithParallelExecution ( true ),
)
analyst := enzu . NewAgent ( "Data Analyst" ,
"Process and analyze research results" ,
llm ,
enzu . WithToolLists ( "AnalysisTool" ),
enzu . WithParallelExecution ( true ),
)
// Pattern: Self-Aware Interactive System
manager := enzu . NewSynergyManager ( "Self-Aware System" , llm , logger )
// Define capability domains
researchSynergy := createDomainSynergy ( "Research" , llm , logger )
analysisSynergy := createDomainSynergy ( "Analysis" , llm , logger )
creativeSynergy := createDomainSynergy ( "Creative" , llm , logger )
// Register domains
manager . AddSynergy ( researchSynergy )
manager . AddSynergy ( analysisSynergy )
manager . AddSynergy ( creativeSynergy )
// Pattern: Extensible Tool System
exaSearchOptions := tools. ExaSearchOptions {
NumResults : 5 ,
Type : "neural" ,
Contents : tools. Contents {
Text : true ,
},
UseAutoprompt : true ,
StartPublishedDate : "2023-01-01T00:00:00.000Z" ,
}
tools . RegisterTool ( "ResearchTool" , exaSearchOptions )
// Pattern: Multi-Agent API Server
type Server struct {
synergy * enzu. Synergy
logger * enzu. Logger
}
// Initialize server with parallel processing capabilities
func NewServer () ( * Server , error ) {
// Create research agents with specific roles
researchAgent1 := enzu . NewAgent ( "Research Agent 1" ,
"Agent specialized in AI research" ,
llm ,
enzu . WithToolLists ( "ResearchTool" ),
enzu . WithParallelExecution ( true ),
)
researchAgent2 := enzu . NewAgent ( "Research Agent 2" ,
"Agent specialized in startup research" ,
llm ,
enzu . WithToolLists ( "ResearchTool" ),
enzu . WithParallelExecution ( true ),
)
// Create parallel processing synergy
synergy := enzu . NewSynergy (
"Parallel AI Research" ,
llm ,
enzu . WithAgents ( researchAgent1 , researchAgent2 ),
enzu . WithLogger ( logger ),
)
return & Server { synergy : synergy , logger : logger }, nil
}
// Handle parallel task execution
func ( s * Server ) handleExecute ( w http. ResponseWriter , r * http. Request ) {
var request struct {
Tasks [] string `json:"tasks"`
}
// Distribute tasks among agents
agents := s . synergy . GetAgents ()
for i , taskDescription := range request . Tasks {
agent := agents [ i % len ( agents )] // Round-robin distribution
tasks = append ( tasks , enzu . NewTask ( taskDescription , agent ))
}
}
ExaSearch
도구)FetchURL
도구)병렬 작업 배포
HTTP 서비스 통합
다중 에이전트 조정
go get github.com/teilomillet/enzu
/docs
: 아키텍처 및 통합 가이드/docs/tutorials
: 단계별 구현 패턴/examples
: 참조 구현 및 사용 사례examples/8_research_assistant_example.go
)examples/7_manager_mode_example.go
)examples/4_parallel_example.go
)examples/3_tools_example.go
)examples/6_api_example.go
)HTTP API 통합
도구 레지스트리 통합
에이전트 협업