import{AgentHarness,any,callModel,loop,until}from'@noetic-tools/core';constagent=loop({id:'react-loop',steps:[callModel({id:'think',model:'openai/gpt-4o',tools:[searchTool,calcTool]})],until:any(until.noToolCalls(),until.maxSteps(10)),});constharness=newAgentHarness({name:'researcher',agentGraph:agent,params:{},});awaitharness.execute('Find recent AI news');const{text}=awaitharness.getAgentResponse();
01·Compose
// core primitives
Meet the building blocks
A small set of composable primitives. Build any agent pattern by combining the pieces you need.
Reasoning loops, parallel workloads, sub-agents — all of it falls out of these seven. The ReAct pattern is 15 lines. A task tree is 40. You can read both in under a minute.
Common agent patterns in a few lines of the same primitives — no pattern library to learn.
Each pattern is a composition of the primitives above — no special cases, no hidden behavior. Read the source. Fork it. The framework doesn't care.
ReAct~15 lines
Reason, act, observe loops
loopcallModelinvokeTool
Ralph Wiggum~10 lines
Retry with feedback until a verifier passes
loopspawncallModelinvokeTool
Task Trees~40 lines
Parallel sub-agent hierarchies
inParallelspawncallModel
Thread Weaving~25 lines
Interleaved parallel workstreams
inParallelcallModelrunCode
Dual Agent~20 lines
Critic + generator collaboration
inParallelchannelrunCode
// read the source
Reasoning loop in 15 lines, full context stack in 10. No boilerplate.
It's the same seven primitives from before. Once you know those, you can read — and change — anything.
react-loop.ts
import{any,callModel,loop,until}from'@noetic-tools/core';constreasonAndAct=loop({id:'react-loop',steps:[callModel({id:'think',model:'openai/gpt-4o',tools:[searchTool,calcTool],}),],until:any(until.noToolCalls(),until.maxSteps(10)),});// Observe → Think → Act — just primitives composed
02·Remember
// context management
Unparalleled context management
Long multi-turn conversations without blowing up the context window.
Working memory, observation extraction, plan tracking, durable checkpoints, and more — assemble the layers you need or build your own. Token costs stay predictable as conversations grow.
LEGEND
working layers
retrieval layers
persistence
Working Memory
Scratchpad for the current turn
Observational Context
Auto-extracted facts from the conversation
Steering
Always-on instructions and guardrails
Static Content
Pinned reference material
History Window
Recent turns, trimmed to a budget
File Reference
On-demand file contents
Tool Context
Recall of prior tool calls and results
Temporal Context
Time-stamped fact extraction and recall
Plan Context
Task tree and execution state
Durable Task State
Persistent agent checkpoints
Custom Layers
Build your own — semantic recall, episodic summaries
03·Endure
// production-grade
Built to survive production
The parts that matter once an agent leaves your laptop.
Write evals as easily as Jest tests, then let the optimizer make your agent better.
Define what "good" looks like for your agent, run it against a dataset, and let GEPA optimization improve it. Gate regressions in CI. Same primitives. Same runtime. Just a feedback loop added.