Show HN: Cogency – Cognitive Architecture for AI Agents (github.com)
It follows a 5-step loop: Plan → Reason → Act → Reflect → Respond. Adding a WebSearchTool to test extensibility, the agent initially failed its first search, reflected on poor results, adapted its query, and then succeeded. This behavior wasn’t programmed; it emerged naturally from the architecture.
Five hours later, I integrated a FileManagerTool — it worked on the first try. Like code compiling first time, except this was intelligence composing zero-config.
Key insight: separating cognitive operations from tool orchestration enables true composability. Most frameworks conflate these, resulting in brittle, unpredictable agents.
Commit timeline: https://github.com/iteebz/cogency
It’s pip-installable (pip install cogency) with production-ready components. Currently dogfooding across projects.
Seeking feedback from the community on the approach and implementation.
9 comments
[ 6.1 ms ] story [ 31.9 ms ] threadUnfortunately, there are a million different cognitive architectures out there, and there's no trivial way to filter through them.
And agreed. It’s a crowded space, and benchmarking is hard without standard tasks or metrics. We’re focused on real-world dogfooding and incremental validation to complement raw numbers atm.
If you want, I can share the current benchmark results and test scenarios.
What stands out is how Cogency tries to balance convention and flexibility, especially the way it handles routing and API hooks without locking you in too hard.
That’s part of why the DX feels tight and fast. Boilerplate was ruthless cut to focus on core reasoning and tool use. Keeps things nimble and maintainable.
Glad the approach resonates! :)
I have been building Cogency with real workloads in mind. That means clear separation of concerns, minimal mental load, and predictable data flow.
Keeping it clean upfront pays off when complexity inevitably grows. Thanks for noticing!
Someone should probably just cut out the middlemen and do exactly that. A mature Actor topology orchestrator with a set of node types varying from binary logic to full agentic loops would go a long way.
It might be more like Apache Storm than strictly an actor framework the more I think about it, but it's there somewhere.
Cogency’s design moves in that direction with modular nodes and message passing, but it’s not fully distributed or truly actor-based yet. The real challenge is building that kind of system in a way that stays manageable and debuggable.
It’s definitely the natural next step for AI frameworks. Thanks for putting it so clearly.
Swapped the custom planner architecture for a leaner ReAct loop (reason → act → observe). It’s not new, but it works. Cleaner logic, better streaming, easier to debug. Less magic, more stability.
The core idea remains: separate cognitive operations from tool orchestration. But now it’s battle-tested, pip-installable, and (more) production-ready.