Skip to main content

Prerequisites

Before you begin, make sure you have:
  • Node.js 18+ installed
  • npm package manager
  • An OpenRouter API key (optional - demo mode works without keys)
Don’t have an OpenRouter key? Try demo mode first - it runs with an in-memory backend and sample data, no API keys required.

Create Your Agent

1

Clone the repository

Clone the ClarkOS SDK:
This gives you a fully-configured project with:
  • Convex backend setup
  • TypeScript configuration
  • Terminal UI (React Ink)
  • 179 passing tests
2

Install dependencies

Install the required packages:
3

Run the doctor (optional)

Validate your environment:
This checks Node version, environment variables, and dependencies.
4

Try demo mode (no keys needed)

Start the agent with an in-memory backend:
This runs the terminal UI with sample data. Great for exploring before configuring API keys.
5

Or configure for full mode

Set up your environment variables:
Edit .env.local with your API keys:
Then run:

Terminal UI

The SDK includes a terminal-based interface built with React Ink:

Keyboard Controls

Your First Tick

The tick is the heartbeat of your agent. Every tick, your agent:
  1. Loads its current state and memories
  2. Gathers context (knowledge, recent activity)
  3. Calculates routine from current time
  4. Executes plugin hooks
  5. Updates state (health drift, counters)
To trigger a tick programmatically:

Explore the API

Your agent exposes HTTP endpoints via the Convex backend:

Add a Plugin

Extend your agent with a plugin:
Register it in your agent:

Run the Tests

The SDK includes 179 tests:

Next Steps

Understand Agents

Learn the core agent architecture.

Master Memory

Deep dive into the memory system.

Build Plugins

Create custom agent capabilities.

Explore Examples

See complete agent implementations.
Need help? Open an issue on GitHub.