@upendra.manike/agent-orchestrator
v0.1.1
Published
Autonomous agent orchestrator: chained LLM calls, tools, memory, streaming.
Maintainers
Readme
@upendra.manike/agent-orchestrator
Autonomous agent orchestrator: chained LLM calls, tool-use, memory, streaming telemetry.
Install
npm i @upendra.manike/agent-orchestratorUsage
import { runAgent, streamAgent, defineTool, makeMemory, makeLLMMock } from '@upendra.manike/agent-orchestrator';
const add = defineTool({
name: 'math.add',
schema: { type: 'object', properties: { a: { type: 'number' }, b: { type: 'number' } }, required: ['a','b'] },
async run({ a, b }) { return { text: String(a + b) }; }
});
const memory = makeMemory();
const llm = makeLLMMock({ responses: [{ role: 'assistant', content: 'Hello from agent.' }] });
const result = await runAgent({ goal: 'Say hello', tools: [add], memory, llm });
console.log(result.finalAnswer);API
runAgent(input)– plan, run, and return final answerstreamAgent(input, onChunk)– likerunAgentbut streams partial outputdefineTool({ name, schema, run })– register a toolmakeMemory()– in-memory vector-less memory with simple searchmakeLLMMock(opts)– deterministic LLM mock for tests
License
MIT
