Skip to content

refactor: remove self-built agent runtime (PR1 of OpenAI Agents SDK migration)#70

Merged
keli-wen merged 3 commits intomasterfrom
refactor/remove-agent-runtime
Apr 25, 2026
Merged

refactor: remove self-built agent runtime (PR1 of OpenAI Agents SDK migration)#70
keli-wen merged 3 commits intomasterfrom
refactor/remove-agent-runtime

Conversation

@keli-wen
Copy link
Copy Markdown
Contributor

@keli-wen keli-wen commented Apr 25, 2026

Part of #71 (Migration to OpenAI Agents SDK).

Summary

What's Deleted

Self-built agent runtime (no internal dependents in surviving code):

  • quantmind/brain/MultiStepAgent / ToolCallingAgent / Memory
  • quantmind/tools/ — custom Tool ABC and validators (replaced by SDK @function_tool)
  • quantmind/storage/LocalStorage (no users; future KnowledgeStore will live in knowledge/)
  • quantmind/tagger/ — tagging becomes a flow-level concern
  • quantmind/models/{agent,memory,messages}.py
  • quantmind/utils/{agentic_ext,monitoring}.py

Peripheral cleanup:

  • Vendored smolagents/ working copy
  • LICENSE-APACHE (no Apache-licensed code remains)
  • All examples/ (will be re-added per-flow in later PRs)
  • Tests for the deleted modules
  • Stale dead deps from pyproject.toml: camel-ai, networkx, scikit-learn, pyvis, plotly
  • Stale quantmind_cli:main entry point (the file never existed)

Also refines:

  • CLAUDE.md rewritten with post-pivot guidance (target architecture, conventions, anti-patterns, reference URLs)
  • New Communication Conventions section in CLAUDE.md requiring English for PR descriptions, issue bodies, and commit messages

What's Retained

The following modules continue to compile and ship in PR1; they will be replaced or migrated in PR2-PR4:

  • quantmind/flow/, llm/, parsers/, sources/, config/
  • quantmind/models/{content,paper,analysis}.py
  • quantmind/utils/logger.py (kept long-term)

Verification

  • pytest tests/ passes (192 passed; 19 deprecation warnings come from Pydantic v1 patterns and are unrelated to this PR)
  • python -c "import quantmind; from quantmind.flow import BaseFlow; from quantmind.models import Paper; from quantmind import config" succeeds
  • git grep -E 'quantmind\.(brain|tools|storage|tagger|models\.(agent|memory|messages)|utils\.(agentic_ext|monitoring))' returns zero hits in retained code
  • All pre-commit hooks pass

Roadmap (subsequent PRs)

See #71 for the umbrella tracking issue. High-level direction:

PR Scope
PR2 knowledge/ + configs/ skeleton (Pydantic schema standard + centralized cfg)
PR3 preprocess/ two-layer structure (fetch + format)
PR4 flows/ + paper_flow + batch_run + magic.py; concurrent removal of flow/ and llm/
PR5 mind/memory/filesystem MVP + trajectory archive
PR6+ Second flow / observability cookbook docs / longer-term KnowledgeStore

🤖 Generated with Claude Code

keli-wen and others added 2 commits April 25, 2026 22:07
Clears the way for migrating Agent capabilities to OpenAI Agents SDK
(see archive/agent-runtime-final on origin for the snapshot of the
removed code; PR2-PR4 will rebuild on the new architecture).

Modules deleted (no internal dependents remain in surviving code):
- quantmind/brain/    (MultiStepAgent / ToolCallingAgent / Memory)
- quantmind/tools/    (custom Tool ABC + validators; replaced by SDK @function_tool)
- quantmind/storage/  (no users; future KnowledgeStore will live in knowledge/)
- quantmind/tagger/   (tagging becomes a flow-level concern)
- quantmind/models/{agent,memory,messages}.py
- quantmind/utils/{agentic_ext,monitoring}.py

Also removed:
- vendored smolagents/ working copy
- LICENSE-APACHE (no Apache-licensed code remains)
- All examples (will be re-added per-flow in later PRs)
- Tests for the deleted modules (tests/{brain,tools,storage,tagger}/ and the
  agent/memory/messages model tests)
- Stale dead deps from pyproject.toml: camel-ai, networkx, scikit-learn,
  pyvis, plotly
- Stale CLI entrypoint reference (quantmind_cli.py never existed)

Modules retained for now (will be replaced/migrated in PR2-PR4 per the
new architecture):
- quantmind/flow/, llm/, parsers/, sources/, config/
- quantmind/models/{content,paper,analysis}.py

Verification: 192 tests pass.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Rewrites CLAUDE.md so a future Claude session opening this repo can quickly
understand the architectural direction (lib on top of OpenAI Agents SDK, NOT
a framework), the transitional module map, the conventions to follow, and
the explicit anti-patterns to avoid.

New sections:
- Target Architecture (the 5 future modules + magic.py)
- Current Repository State (transitional module table)
- Architecture Principles (8 principles distilled from design doc)
- Conventions When Editing (schemas / configs / tools / memory / tests / imports)
- Things NOT to Do (8 explicit anti-patterns including no CLI, no agent
  framework rebuild, no batch+memory mixing in MVP)
- Reference Material (SDK docs URLs + archive branch)
- Roadmap table (PR2-PR6+)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@keli-wen keli-wen self-assigned this Apr 25, 2026
@keli-wen keli-wen added the enhancement New feature or request label Apr 25, 2026
Adds a Communication Conventions section to make explicit that PR
descriptions, issue bodies, and commit messages must be in English so
external readers (search indexers, future maintainers, contributors) can
follow the history. Inline review comments / discussion threads can stay
in whichever language fits the participants.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@keli-wen keli-wen merged commit a312cf9 into master Apr 25, 2026
1 check passed
@keli-wen keli-wen deleted the refactor/remove-agent-runtime branch April 25, 2026 15:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant