Summary
Refactor the src/openhuman/agent/ area into a much smaller, clearer structure. The current folder has too many files and overlapping responsibilities, which makes onboarding, debugging, and feature work slower than it should be.
Problem
The agent/ code has grown organically and now feels fragmented:
- Logic for planning/orchestration/prompting/runtime is split across many files and subfolders.
- Boundaries are hard to understand (what is core agent vs harness vs prompt assembly vs memory glue).
- Similar concepts are represented in multiple places, increasing drift and duplicate behavior.
- Small changes often require touching several files, raising review overhead and regression risk.
This hurts contributors and maintainers, especially when adding new agent roles or evolving orchestration.
Solution (optional)
Simplify with a deliberate module map and fewer top-level concepts:
- Define a compact target architecture (e.g.
core, orchestration, prompts, memory-integration, types).
- Merge thin/overlapping files where separation adds little value.
- Keep only one obvious entrypoint for building/running agents.
- Keep orchestration and prompt construction discoverable and colocated with agent core types.
- Add module docs that explain ownership and call flow in 1-2 screens.
Do this incrementally to avoid a destabilizing big-bang rewrite.
Acceptance criteria
Related
Summary
Refactor the
src/openhuman/agent/area into a much smaller, clearer structure. The current folder has too many files and overlapping responsibilities, which makes onboarding, debugging, and feature work slower than it should be.Problem
The
agent/code has grown organically and now feels fragmented:This hurts contributors and maintainers, especially when adding new agent roles or evolving orchestration.
Solution (optional)
Simplify with a deliberate module map and fewer top-level concepts:
core,orchestration,prompts,memory-integration,types).Do this incrementally to avoid a destabilizing big-bang rewrite.
Acceptance criteria
src/openhuman/agent/has materially fewer files/modules, with redundant layers removed.Related