feat: MultiUserHistory + DAGExecutor + ComplexityClassifier v0.2.0#2
Open
mrkeithelliott wants to merge 2 commits into
Open
feat: MultiUserHistory + DAGExecutor + ComplexityClassifier v0.2.0#2mrkeithelliott wants to merge 2 commits into
mrkeithelliott wants to merge 2 commits into
Conversation
…abs-agentflow v0.1.1 - Rename package to gittielabs-agentflow in pyproject.toml (import stays agentflow) - Add LLM_CALL_STARTED / LLM_CALL_COMPLETED constants to events.py - Emit LLM call events from AgentExecutor.run() with node_id, session_id, timing, and token usage - Fix google_genai.py: thinking metadata was computed but dropped; now passed to AgentResponse - Export new event constants from agentflow.__init__ - Add orchestration and telemetry optional dependency groups Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- session/multi_user.py: MultiUserHistory with HistoryPersistence protocol
- Per-user in-memory history with configurable max and optional persistence backend
- load()/save() for pluggable DB persistence (e.g. PostgreSQL adapter)
- Lazy loading: each user's history is loaded from persistence exactly once per session
- orchestration/types.py: Plan and PlanStep TypedDicts
- orchestration/executor.py: DAGExecutor with topological round-batching
- asyncio.gather() for independent steps, dependency resolution via {{key.result}} refs
- Graceful fallback to sequential execution on circular deps
- orchestration/classifier.py: ComplexityClassifier
- Fast bypass for short messages (< 20 words, no multi-step markers)
- Haiku LLM call for ambiguous messages, defaults to SIMPLE on failure
- Export all new symbols from agentflow.__init__
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
session/multi_user.py:MultiUserHistory— per-user in-memory history dict with optionalHistoryPersistenceprotocol for pluggable DB backends. Replaces rawdefaultdict(list)+ manual loaded-tracking in openclaw'sruntime.py.orchestration/types.py:PlanandPlanStepTypedDicts extracted from openclaw's runtime.orchestration/executor.py:DAGExecutor— topological round-batching async executor. Runs independent steps withasyncio.gather(), resolves{{output_key.result}}dependencies, falls back to sequential on circular deps.orchestration/classifier.py:ComplexityClassifier— fast bypass for short messages (<20 words, no multi-step markers), Haiku LLM call for ambiguous messages, defaults to SIMPLE on failure.agentflowpackage.Test plan
pytest tests/ -v— 150 tests passpython -c "from agentflow import MultiUserHistory, DAGExecutor, ComplexityClassifier, Plan, PlanStep; print('ok')"🤖 Generated with Claude Code