// agent framework

NOETIC

Primitives to build agents from scratch.
Patterns to start fast.

$ bun add @noetic/core
Read the docsView on GitHub
react-agent.ts
import { react } from '@noetic/core';
import { InMemoryRuntime } from '@noetic/core';

const agent = react({
  model: 'gpt-4o',
  tools: [searchTool, calcTool],
  until: until.tokenBudget(4000),
});

const runtime = new InMemoryRuntime();
const result = await execute(agent, runtime);
// primitives

Seven Primitives. Any Pattern.

run

Execute a pure function

(fn: (ctx) => T) => Step
llm

Call a language model

(params: ModelParams) => Step
tool

Invoke an external tool

(name, input, fn) => Step
branch

Conditional step selection

(condition, then, else) => Step
fork

Parallel step execution

(steps[], strategy) => Step
spawn

Launch a child agent

(agentConfig) => Step
loop

Repeat steps until condition

(steps[], until) => Step
// patterns

Compose Primitives into Patterns

react.ts
import { react } from '@noetic/core';

const agent = react({
  model: 'gpt-4o',
  tools: [searchTool, calculatorTool],
  until: until.tokenBudget(4000),
});

// Observe → Think → Act loop
const result = await execute(agent, runtime);
// memory layers

Layered Memory System

┌─ Working Memory ────────────────────────────────────────┐
Scratchpad for current turn
└────────────────────────────────────────────────┘
┌─ Observational Memory ────────────────────────────────────────┐
Auto-extracted facts from conversation
└────────────────────────────────────────────────┘
┌─ Semantic Recall ────────────────────────────────────────┐
Vector-indexed long-term storage
└────────────────────────────────────────────────┘
┌─ Episodic Memory ────────────────────────────────────────┐
Past conversation summaries
└────────────────────────────────────────────────┘
┌─ Durable Task State ────────────────────────────────────────┐
Persistent agent checkpoints
└────────────────────────────────────────────────┘
assembleView() → merged context → LLM
// batteries included

Built-in Patterns

eval-framework
Coming SoonEval Framework + RL Pipeline

Write evals as easily as Jest tests. Train agents with reinforcement learning.

  EVAL RUN: agent-quality-v3
  ─────────────────────────────────

  ✓ PASS  responds to greeting          12ms
  ✓ PASS  uses search tool correctly    340ms
  ✗ FAIL  handles ambiguous query       280ms
  ✓ PASS  stays within token budget     890ms
  ✓ PASS  cites sources accurately      450ms

  Results: 4/5 passed (80%)

  RL PIPELINE ━━━━━━━━━━━━━━━ READY
  reward signal: accuracy + cost
  policy update: pending