Commit Graph

367 Commits

Author SHA1 Message Date
chiguyong b2709da08b feat(cli): AgentKit CLI with serve/version/health/task/skill/init/usage
U1: CLI framework (Typer) + serve/version/health commands + __main__.py + pyproject scripts
U2: task command group (submit/status/list/cancel) with remote mode
U3: skill command group (list/load/info) with local and remote modes
U4: init command (generates agentkit.yaml/.env.example/docker-compose/skills) + usage command

31 tests passing, TDD workflow.
2026-06-06 12:45:51 +08:00
chiguyong acec8ff743 feat(evolution): Phase A - lifecycle hooks + EvolutionConfig
U11: EvolutionMixin integrated into ConfigDrivenAgent lifecycle
  - on_task_complete triggers evolve_after_task
  - on_task_failed records failure patterns
  - Evolution errors never break main task flow

U12: EvolutionConfig added to SkillConfig
  - enabled, reflect_on_failure, auto_apply, min_quality_threshold
  - Backward compatible: defaults to enabled=False

21 new tests passing, no regression.
2026-06-06 12:05:56 +08:00
chiguyong 2844eeb548 feat(streaming): Phase C - LLM streaming + ReAct events + SSE endpoint
U8: StreamChunk protocol + OpenAI chat_stream + Gateway streaming with usage tracking
U9: ReActEvent dataclass + execute_stream() yielding thinking/tool_call/tool_result/final_answer
U10: POST /tasks/stream SSE endpoint + Client SDK stream_task()

15 new tests passing, no regression.
2026-06-06 11:54:17 +08:00
chiguyong ec0e221beb feat(server): Phase D - async task system (TaskStore + BackgroundRunner + API)
U5: TaskStore - in-memory task state with TTL cleanup and max records
U6: BackgroundRunner - async task execution with semaphore concurrency control
U7: Task status/result API + cancel endpoint + async submit mode

45 tests passing (28 new + 17 existing, no regression).
2026-06-06 11:39:41 +08:00
chiguyong 5f1c51cf9a feat(server): Phase B - auth, rate limiting, SSRF protection, handler whitelist
U1: API Key authentication middleware (dev mode skip, health whitelist)
U2: Rate limiting middleware (fixed-window, 60 req/min default)
U3: Callback URL SSRF protection (private IP blocking)
U4: custom_handler module prefix whitelist

65 tests passing. CORS conflict fixed.
2026-06-05 23:37:36 +08:00
chiguyong f87b790c0f feat(agentkit): v2 Phase 1 - ReAct/LLM Gateway/Skill/Server + review fixes
535 unit + 52 integration tests passing. README added.
2026-06-05 23:32:16 +08:00
chiguyong 669ca604e5 feat(configs): add GEO AgentKit Server configuration
- llm_config.yaml: DeepSeek + OpenAI-compatible providers with env var substitution
- skills/ (8 YAML): citation_detector, content_generator, deai_agent, geo_optimizer,
  monitor, schema_advisor, competitor_analyzer, trend_agent
  - Added intent fields for content_generator, competitor_analyzer, trend_agent
  - Added quality_gate fields for content_generator, deai_agent, geo_optimizer
  - Updated custom_handler paths to configs.geo_handlers
- geo_tools.py: 14 FunctionTools calling GEO Backend via HTTP
- geo_handlers.py: 3 custom handlers (citation/monitor/schema) calling /internal/ API
- geo_server.py: FastAPI factory with LLM Gateway, Tool Registry, Skill Registry
2026-06-05 23:25:14 +08:00
chiguyong 47a848fbcb feat(deploy): add Dockerfile and .dockerignore for AgentKit Server
- Multi-stage build (builder + runner) based on python:3.11-slim
- Installs .[server] extra (fastapi + uvicorn)
- Runs as non-root appuser
- Health check on /api/v1/health
- Default command: uvicorn configs.geo_server:create_geo_app --port 8001
2026-06-05 23:18:44 +08:00
chiguyong 133ae3927e test(u8): add GEO business integration tests for YAML configs and agent creation
41 tests covering:
- 8 YAML config file loading and validation
- ConfigDrivenAgent creation from YAML (llm_generate/tool_call/custom)
- Custom handler routing (citation/monitor/schema)
- Tool registration completeness
- Adapter compatibility (unique names/types, no task overlap)
2026-06-05 17:25:51 +08:00
chiguyong 35f84fd770 test(orchestrator): add multi-agent collaboration integration tests
- Pipeline parallel execution with topological grouping
- Conditional stages (execute/skip)
- Circular dependency detection
- Variable resolution ${var.path}
- Handoff message creation and serialization
- DynamicPipeline: conditional, loop, nested
- End-to-end: content production pipeline with handoff
- 18 new tests, total 148 passing
2026-06-04 22:59:29 +08:00
chiguyong 96ea0c2972 feat(mcp,evolution): add Transport layer and Evolution lifecycle integration
U5 - MCP Transport:
- Transport abstract base class with connect/disconnect/send_request
- HTTPTransport: Streamable HTTP with JSON-RPC 2.0
- SSETransport: Server-Sent Events + HTTP POST hybrid
- MCPClient: from_transport() factory method
- 31 transport tests

U6 - Evolution Lifecycle:
- EvolutionMixin: reflect → optimize → AB test → apply/rollback
- EvolutionLogEntry: tracks each evolution step
- Integrates with BaseAgent on_task_complete hook
- 10 lifecycle tests

Total: 130 tests passing
2026-06-04 22:55:23 +08:00
chiguyong cc6a858150 test(memory): add memory system tests with BaseAgent lifecycle integration
- InMemoryMemory test implementation
- SemanticMemory: RAG + graph search tests
- MemoryRetriever: weight-based ranking, token budget
- BaseAgent lifecycle: on_task_start loads, on_task_complete stores, on_task_failed records
- 19 new tests, total 89 passing
2026-06-04 22:44:27 +08:00
chiguyong d73a3391ab feat(tools): add MCPTool, SequentialChain, ParallelFanOut, DynamicSelector
- MCPTool: call remote MCP tools via MCPClient
- SequentialChain: chain tools with output-to-input piping
- ParallelFanOut: execute tools concurrently with merge strategies
- DynamicSelector: keyword/LLM-based tool selection
- 14 new tests, total 70 passing
2026-06-04 22:42:22 +08:00
chiguyong 5a90824c77 feat(core): add ConfigDrivenAgent with YAML-driven agent definition
- AgentConfig: YAML/dict config model with validation
- ConfigDrivenAgent: 3 task modes (llm_generate, tool_call, custom)
- StandaloneRunner: auto-discover YAML configs and build agents
- 25 new tests covering all modes and edge cases
- Total: 56 tests passing
2026-06-04 22:39:25 +08:00
chiguyong 2ddffcdf37 chore: add .gitignore and remove cached files 2026-06-04 22:28:44 +08:00
chiguyong cc3dfd44e3 fix: switch to setuptools for Python 3.14 compatibility 2026-06-04 22:27:06 +08:00
chiguyong 9a6d6fee4e feat: initial fischer-agentkit package with unified agent architecture
- BaseAgent with handle_task() pattern (execute template moved up)
- Protocol: TaskMessage, TaskResult, HandoffMessage, EvolutionEvent
- Tool system: FunctionTool, AgentTool, ToolRegistry with versioning
- Memory system: WorkingMemory (Redis), EpisodicMemory (pgvector), SemanticMemory (RAG adapter), MemoryRetriever (hybrid)
- Evolution engine: Reflector, PromptOptimizer (DSPy-style), StrategyTuner, ABTester, EvolutionStore
- Orchestrator: PipelineEngine (parallel DAG), PipelineLoader (YAML), HandoffManager, DynamicPipeline
- MCP: Server (FastAPI), Client (httpx), MCPTool
- Prompts: PromptTemplate, PromptSection
- Exceptions: full hierarchy including Tool, Schema, Handoff, Evolution errors
- Tests: unit tests for core, tools, protocol, evolution, pipeline
2026-06-04 22:24:06 +08:00