- research_agent/tools.py: 한글 Docstring 및 ASCII 흐름도 추가
- research_agent/researcher/depth.py: ResearchDepth enum 및 DepthConfig 추가
- research_agent/researcher/ralph_loop.py: Ralph Loop 반복 연구 패턴 구현
- research_agent/researcher/runner.py: 연구 실행기 (CLI 지원)
- tests/researcher/: 91개 테스트 (실제 API 호출 포함)
- scripts/run_ai_trend_research.py: AI 트렌드 연구 스크립트 + 도구 궤적 로깅
- Context_Engineering.md: 에이전트 컨텍스트 엔지니어링 개념 정리 문서 추가
- Context_Engineering_Research.ipynb: 연구 노트북 업데이트
- deepagents_sourcecode/: docstring과 주석을 한국어로 번역
Remove OpenAIProvider and AnthropicProvider in favor of RigAgentAdapter
which properly wraps Rig's native providers. This fixes a critical bug
where the tools parameter was completely ignored in the legacy providers.
Changes:
- Add src/compat/ module with RigToolAdapter and RigAgentAdapter
- Delete src/llm/openai.rs and src/llm/anthropic.rs
- Update ProductionConfig to use RigAgentAdapter
- Update all doc comments and examples to use new API
- Update e2e tests to use RigAgentAdapter
The new adapters provide:
- Proper integration with Rig's 20+ LLM providers
- LLMProvider trait compatibility for existing code
- RigToolAdapter for using Rig tools in rig-deepagents
Test: 401 library tests pass, clippy clean
Python DeepAgents와 완전한 기능 동등성 달성을 위한 미들웨어 시스템 확장:
## AgentMiddleware 트레이트 확장
- before_model/after_model hooks 추가 (LLM 호출 전후 개입)
- ModelRequest/ModelResponse/ModelControl 타입 추가
- InterruptRequest/ActionRequest/ReviewConfig/Decision 타입 추가
## 새 미들웨어 구현
- PatchToolCallsMiddleware: 댕글링 tool call 자동 패치
- AIMessage의 tool_calls에 대응 ToolMessage 없을 때 합성 응답 삽입
- before_agent hook 사용
- HumanInTheLoopMiddleware: 인간 승인 인터럽트
- 특정 도구 호출 전 실행 중단 및 승인 요청
- after_model hook 사용
- InterruptOnConfig로 도구별 설정
## 기타 변경
- DeepAgentError::Interrupt variant 추가
- AgentExecutor에 model hooks 통합
- MiddlewareStack에 before_model/after_model orchestration 추가
+1,182줄, 415개 테스트 통과
- ToolVertex compilation: instantiate real ToolVertex from registry
instead of PassthroughVertex placeholder when tool and backend available
- SubAgent timeout: wrap executor.run() with configurable timeout
(default 5 minutes), add MiddlewareError::SubAgentTimeout variant
- Edge labels: add EdgeMetadata struct, update edge storage to
Vec<(VertexId, Option<EdgeMetadata>)>, add add_edge_with_label()
method for Mermaid diagram visualization
- RedisCheckpointer: full implementation with TTL support, compression,
and workflow isolation via key prefix pattern
- PostgresCheckpointer: full implementation with connection pooling,
compression, and ACID-compliant storage using SQLx
All 356 unit tests passing. Feature-gated dependencies:
checkpointer-redis, checkpointer-postgres
Implements all P1 critical features required for production-ready workflow execution:
## AgentVertex Real Tool Execution
- Added ToolRegistry for mapping tool names to implementations
- Created new_with_registry() constructor for full tool execution support
- Tools are executed via execute_tool() with proper error handling
- Graceful fallback when tool not in registry (returns error message)
## StateMatch Stop Condition
- Implemented state field matching using JSON serialization
- Supports dot notation for nested paths (e.g., "research.status")
- Added get_state_field() helper for field extraction
- Added Serialize bound to Vertex impl for state access
## ToolVertex State Argument Resolution
- Implemented build_arguments() to merge static and state-resolved args
- State args override static args with same key
- Supports nested state paths (e.g., "settings.max_results")
- Added comprehensive tests for resolution, override, and missing paths
## SubAgent Registry Integration
- Added compile_with_all() for full resource compilation
- SubAgentVertex created when registry, executor, and backend available
- Falls back to PassthroughVertex with warning when resources missing
## New APIs
- ToolRegistry: new(), register(), get(), definitions(), names()
- CompiledWorkflow::compile_with_all(): full resource compilation
- CompiledWorkflow::compile_with_registry(): tool registry compilation
## Test Coverage
- 13 new unit tests for tool execution and state matching
- All 384 tests passing (356 lib + 10 skill-validator + 15 integration + 3 doc)
Implements comprehensive end-to-end testing infrastructure with actual
LLM and API integrations:
SQLite Checkpointer:
- Full async SQLite persistence with tokio-rusqlite
- Optional zstd compression support for reduced storage
- Workflow isolation by ID
- History cleanup with retention policies
- 10 dedicated unit tests
Production Configuration:
- Environment-based config (OPENAI_API_KEY, TAVILY_API_KEY)
- Support for OpenAI and Anthropic providers
- ProductionConfig with builder pattern for customization
- ProductionSetup for complete workflow initialization
CompiledWorkflow Enhancements:
- compile_with_tools() method for full LLM + tools support
- Real AgentVertex integration when LLM provider available
- Fallback to PassthroughVertex for no-LLM scenarios
E2E Test Suite (9 tests, 8 require API keys):
- Basic OpenAI completion
- LLM with tool definitions
- Tavily search execution
- Production config validation
- Simple agent workflow execution
- Research state management
- Full production setup
- Token usage tracking
- Invalid API key error handling
Integration Tests (15 tests):
- SQLite checkpointer with ResearchState
- Research state workflow transitions
- Budget enforcement
- Source/direction deduplication
- Full state checkpoint with messages
Total test count: 378 tests passing
- Add can_continue computed field to ResearchState for router compatibility
- Add refresh_can_continue() method for manual state mutation scenarios
- Fix memory leak in skills middleware test helper (TempDir tuple pattern)
- Add convenience re-exports for domain tools and research module in lib.rs
- Implements FanOutVertex for broadcasting and splitting messages
- Implements FanInVertex for collecting and merging results
- Adds SplitStrategy (Broadcast, Split, RoundRobin) support
- Adds MergeStrategy (Collect, First, Last, Concat, Merge) support
- Includes comprehensive tests for parallel execution patterns
- Adds placeholder files for graph, router and tool vertices
Design for workflow graph visualization feature:
- to_mermaid(): Static structure diagram for debugging
- to_mermaid_with_state(): Runtime state with colors
- log_state(): Terminal output for monitoring
Node types distinguished by shape, conditional edges
shown as dotted lines with labels.
- Added `mod.rs` for the workflow graph system, outlining the structure and usage.
- Introduced `node.rs` defining various node types (Agent, Tool, Router, etc.) and their configurations.
- Created `vertices/agent.rs` implementing the `AgentVertex` for LLM-based processing with tool calling capabilities.
- Added `vertices/mod.rs` to organize vertex implementations.
- Implemented serialization and deserialization for node configurations using Serde.
- Included tests for node configurations and agent vertex functionality.