Getting Started
Install Noetic and build your first agent in under 5 minutes.
Installation
npm i @noetic/coreOr with your preferred package manager:
bun add @noetic/core
pnpm add @noetic/coreYour First Agent
Build a ReAct agent in under 10 lines. This agent loops over an LLM step, calling tools until the model decides it has the answer.
import { z } from 'zod';
import { react, step, until } from '@noetic/core';
const searchTool = {
name: 'search',
description: 'Search the web for information',
input: z.object({
query: z.string(),
}),
output: z.object({
result: z.string(),
}),
execute: async (args) => {
return { result: `Results for: ${args.query}` };
},
};
const agent = react({
model: 'gpt-4o',
system: 'You are a helpful research assistant.',
tools: [searchTool],
maxSteps: 5,
});The react pattern composes three primitives under the hood: step.llm, until.noToolCalls, and a loop. You can build the same thing yourself for full control -- see Loop & Until.
What Happens When You Run It
- The LLM receives the system prompt and user input.
- If the model calls a tool, Noetic executes it and feeds the result back.
- The loop repeats until the model responds without tool calls, or the step limit is reached.
- The final text output is returned.
Next Steps
- Overview -- understand Noetic's philosophy and the 7 primitives.
- Steps -- learn about
step.run,step.llm, andstep.tool. - Control Flow -- branch and fork for conditional and parallel logic.
- Loop & Until -- iteration with termination predicates.