Skip to content

@cognipeer/agent-sdkA smart runtime for autonomous agents.

Typed tools, explicit planning, configurable reasoning, resilient context handling, and inspectable execution — without leaving plain TypeScript.

Start Here

If you are integrating the SDK for the first time, read the docs in this order:

  1. Getting Started to get a working agent into your app fast.
  2. Native Providers to connect to OpenAI, Anthropic, Azure, Bedrock, Vertex, or any compatible endpoint without additional dependencies.
  3. Core Concepts to understand what actually lives in state, what is emitted as an event, and what gets summarized.
  4. Architecture to understand the smart wrapper, the base loop, and where runtime decisions are made.

Quick Start

ts
import { createSmartAgent, createTool, createProvider, fromNativeProvider } from "@cognipeer/agent-sdk";
import { z } from "zod";

const lookup = createTool({
  name: "lookup_owner",
  description: "Return the owner for a project code",
  schema: z.object({ code: z.enum(["ORBIT", "NOVA"]) }),
  func: async ({ code }) => ({ owner: code === "ORBIT" ? "Ada Lovelace" : "Grace Hopper" }),
});

// OpenAI, Anthropic, Azure, Bedrock, Vertex, or any compatible endpoint
const model = fromNativeProvider(
  createProvider({ provider: "openai", apiKey: process.env.OPENAI_API_KEY! }),
  { model: "gpt-4o" },
);

const agent = createSmartAgent({
  model,
  tools: [lookup],
  runtimeProfile: "balanced",
  planning: { mode: "todo" },
  limits: { maxToolCalls: 6, maxContextTokens: 12000 },
});

const result = await agent.invoke({
  messages: [{ role: "user", content: "Compare ORBIT and NOVA." }],
});
console.log(result.content);

What This Site Optimizes For

  • Fast product onboarding without hand-wavy architecture claims.
  • Clear separation between the minimal loop and the smart runtime wrapper.
  • Practical guidance for provider-native reasoning, reflection, and stateful execution surfaces.
  • Production-oriented guidance for autonomous agents, especially around planning, context pressure, and tracing.
  • A product-led docs surface with platform attribution kept in the footer instead of the header.

Agent SDK is part of the Cognipeer platform.