Skip to main content
Cognitio Agent SDK gives your JavaScript or TypeScript application an agent loop: a model chooses a tool, receives its result, and continues until the task is complete. You choose the model, instructions, tools, and permissions. It is built on OpenCode and includes a matching local runtime. Install one npm package; you do not need to install or launch a separate CLI.

Start with a working agent

The quickstart takes you from an empty directory to a running agent using Node.js and a provider API key.
This example uses OPENAI_API_KEY from your environment and disables tools for its first text-only response. The quickstart includes installation, credentials, the run command, and expected output.

What you can build

Choose an entry point

Start with Agent. It holds reusable configuration; agent.run() completes one task, and await agent.createSession() creates a conversation. Use query() when you want one streamed task without managing an Agent object. Use createAgentClient() when your application needs direct ownership of the runtime and its sessions. All three use the same runtime. Local execution starts with isolated configuration and state by default. There is no isolation flag to enable. See runtime defaults when you need custom credentials, persistent state, or host configuration.

Learn by running a project

The cookbooks include complete code and commands for a chat CLI, contact extraction, a custom calculator tool, and a conversation with memory. Each recipe also links to its source on GitHub. The SDK reference describes the JavaScript and TypeScript API. The runtime HTTP API is for advanced integrations that operate a server directly; you can use the SDK without learning that protocol. Need help? Visit troubleshooting or email ugurlu.oozgur@gmail.com.