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)
Create Your Agent
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
Run the doctor (optional)
Validate your environment:This checks Node version, environment variables, and dependencies.
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.
Terminal UI
The SDK includes a terminal-based interface built with React Ink:Keyboard Controls
| Key | Action |
|---|---|
q | Quit |
r | Refresh data |
m | Toggle radio panel |
v | Toggle view mode |
Ctrl+C | Force quit |
Your First Tick
The tick is the heartbeat of your agent. Every tick, your agent:- Loads its current state and memories
- Gathers context (knowledge, recent activity)
- Calculates routine from current time
- Executes plugin hooks
- Updates state (health drift, counters)
Explore the API
Your agent exposes HTTP endpoints via the Convex backend:| Endpoint | Method | Description |
|---|---|---|
/health | GET | Health check |
/state | GET | Current agent state |
/memories | GET | Query memories |
/memories | POST | Store a memory |
/memories/core | GET | Core memories |
/memories/stats | GET | Memory statistics |
/knowledge | GET | Knowledge items |
/logs | GET | Activity logs |
Add a Plugin
Extend your agent with a plugin: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.