Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Show HN: Cogency – Cognitive Architecture for AI Agents (github.com/iteebz)
19 points by cogencyai 54 days ago | hide | past | favorite | 9 comments
Yesterday I built something that probably shouldn’t exist yet. In 9 hours, I created a cognitive architecture demonstrating emergent reasoning.

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.



It seems to me that every iteration of AI agent framework idea is taking us closer down the path to what is ultimately just an Actor framework where the mailbox is an AI agent instead of a code loop.

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.


Most AI agent frameworks today are really just big event loops pretending to be distributed systems. True actors are isolated, stateful entities that communicate only via messages.

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.


Just shipped v0.4.1 — major simplification under the hood.

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.


This is pretty cool, love seeing more opinionated starter kits that actually focus on developer experience and modern build performance. So many boilerplates get bloated fast.

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.


Thanks for the kind words. I actually stripped out most routing recently in favor of a lean, single-loop ReAct core. The last architecture was classic wheel reinvention. It still maintains the light abstractions and modular nodes wired together with simple, explicit logic.

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! :)


Got any benchmarks to go along with it?

Unfortunately, there are a million different cognitive architectures out there, and there's no trivial way to filter through them.


Thanks for asking. I’ve done some initial benchmarking on memory footprint and response latency under concurrent load, showing stable behavior with low overhead. Nothing exhaustive yet, but results so far are promising.

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.


Skimmed through this, really like how clean the structure is. A lot of starter kits feel like they solve “hello world” but get messy fast when you scale.


100%. Scalability starts with discipline in architecture > feature bloat.

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!




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: