Skip to content

API Reference

This section is meant to answer a practical question quickly: which public surface do you touch for the integration you are building?

Read this section by task

If you need to...Start here
choose between the base loop and the smart runtimeAgent Construction
define tools or understand built-in context toolsTools & Context Tools
expose a large capability catalog without binding every tool up frontSkills
connect LangChain models, MCP tools, or a custom model adapterAdapters & Models
understand planning instructions and system prompt shapingPrompting & Planning
wire state, events, plans, or snapshots into your appState & Public Types
understand internal runtime phases for debuggingRuntime Internals

The public surface in one view

Export groupWhy it exists
createAgent(...)Minimal deterministic loop with tools, limits, approvals, and optional structured output.
createSmartAgent(...)Smart runtime for autonomous agents: profiles, planning, context compaction, and memory.
createTool(...)Typed tool construction with optional approval and execution controls.
Skill, SkillPolicy, DEFAULT_SKILL_POLICY, SMALL_TIER_SKILL_POLICYProgressive capability disclosure for tool-heavy smart agents.
fromLangchainModel(...), fromLangchainTools(...), withTools(...)Adapters for model and tool ecosystems.
buildSystemPrompt(...)Reuse the runtime prompt shape directly when needed.
tracing sinksSend runtime traces to file, HTTP, Cognipeer, OTLP, or custom sinks.

What this API reference is not

This section is not a full reproduction of every line in src/types.ts. It is organized around integration decisions rather than raw declaration dumps.

  1. Agent Construction
  2. Tools & Context Tools
  3. Skills
  4. Adapters & Models
  5. State & Public Types

Read Prompting & Planning and Runtime Internals when you need to understand smart runtime behavior or debug execution.

Studio · Pulse · Console · Agent SDK and more — the Cognipeer documentation hub