Cognipeer Agent SDK
A deterministic TypeScript agent runtime for planning, safety, memory, and multi-agent orchestration. Zero-graph, message-first design with built-in summarization, guardrails, and structured tracing.
Key Features
Executes agent reasoning through a transparent, message-driven runtime with full conversational traceability.
Structures agent workflows through managed task planning and explicit execution steps.
Persists agent state to enable workflow pausing and asynchronous continuation.
Introduces approval and review checkpoints within agent decision processes.
Allows live agent execution to be stopped, redirected, or overridden in real time.
Compresses long conversational context using token-aware memory summarisation.
Applies runtime safety and policy controls to govern agent behaviour and outputs.
Captures detailed execution traces, tool calls, and reasoning events.
Architecture
A deterministic while-loop — no external graph runtime. Each turn flows through these stages:
1. Resolver
Normalize state (messages, counters, limits)
2. Context Summarize
Archive heavy tool outputs when token estimates exceed limit
3. Agent
Invoke the model (binding tools when supported)
4. Tools
Execute proposed tool calls with configurable parallelism
Quick Start
import { createSmartAgent, createTool, fromLangchainModel } from "@cognipeer/agent-sdk";
import { ChatOpenAI } from "@langchain/openai";
import { z } from "zod";
const echo = createTool({
name: "echo",
description: "Echo back user text",
schema: z.object({ text: z.string().min(1) }),
func: async ({ text }) => ({ echoed: text })
});
const model = fromLangchainModel(new ChatOpenAI({
model: "gpt-4o-mini",
apiKey: process.env.OPENAI_API_KEY,
}));
const agent = createSmartAgent({
name: "ResearchHelper",
model,
tools: [echo],
useTodoList: true,
limits: { maxToolCalls: 5, maxToken: 8000 },
tracing: { enabled: true },
});
const result = await agent.invoke({
messages: [{ role: "user", content: "plan a greeting and send it" }],
toolHistory: [],
});Cognipeer Agent SDK vs Alternatives
| Product | Primary Role | Deterministic Runtime | Planning | Summarisation | Guardrails | Interrupt | Pause / Continue | Human-in-the-Loop | Multi-Agent | Structured Output |
|---|---|---|---|---|---|---|---|---|---|---|
Cognipeer Agent SDK | Deterministic Agent Runtime | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
LangChain (JS) | LLM Framework | ✕ | △ | ✕ | ✕ | ✕ | ✕ | ✕ | △ | △ |
LangGraph | Graph-based Agent Runtime | ✕ | △ | ✕ | ✕ | ✕ | △ | ✕ | ✓ | △ |
OpenAI Assistants API | Managed Agent Runtime | ✕ | ✕ | ✕ | △ | ✕ | ✕ | ✕ | ✕ | △ |
CrewAI | Multi-Agent Framework | ✕ | △ | ✕ | ✕ | ✕ | ✕ | ✕ | ✓ | ✕ |
Microsoft Autogen | Multi-Agent Framework | ✕ | △ | ✕ | ✕ | ✕ | ✕ | ✕ | ✓ | ✕ |