@compilr-dev/sdk
v0.1.7
Published
Universal agent runtime for building AI-powered applications
Maintainers
Readme
@compilr-dev/sdk
\|/
╭══════════╮ ___ ___ _ __ ___ _ __ (_) |_ __
║' ▐▌ ▐▌ │ / __|/ _ \| '_ ` _ \| '_ \| | | '__|
║ │ | (__| (_) | | | | | | |_) | | | |
╰─═──────═─╯ \___|\___/|_| |_| |_| .__/|_|_|_|
\________\ | | .dev
|_| sdkUniversal agent runtime for building AI-powered applications
Overview
The SDK sits on top of @compilr-dev/agents and @compilr-dev/agents-coding, providing a high-level API for agent creation, tool assembly, and multi-agent teams. It's the runtime that powers @compilr-dev/cli.
Features
createCompilrAgent()— three lines to a fully configured AI agentcreateTeam()— multi-agent teams with role identity and task handoff- Presets —
coding(40+ tools) andread-onlyout of the box - 9 LLM Providers — Claude, OpenAI, Gemini, Ollama, Together, Groq, Fireworks, Perplexity, OpenRouter
- System Prompt Builder — modular, token-aware prompt assembly
- Full Re-exports — use the SDK as your single dependency for the entire compilr-dev stack
Installation
npm install @compilr-dev/sdkPeer dependencies:
npm install @compilr-dev/agents @compilr-dev/agents-codingQuick Start
import { createCompilrAgent } from '@compilr-dev/sdk';
const agent = createCompilrAgent({
provider: { type: 'anthropic' },
});
const result = await agent.run('Fix the failing tests in src/auth/');
console.log(result.response);Custom Domain (Non-Coding)
import { createCompilrAgent, defineTool, createSuccessResult } from '@compilr-dev/sdk';
const agent = createCompilrAgent({
preset: 'none',
systemPrompt: 'You are an HR assistant.',
tools: {
custom: [
defineTool({
name: 'search_kb',
description: 'Search the knowledge base',
parameters: { query: { type: 'string' } },
execute: async ({ query }) => createSuccessResult(`Results for: ${query}`),
}),
],
},
});Multi-Agent Team
import { createTeam } from '@compilr-dev/sdk';
const team = createTeam({
agents: {
arch: { role: 'architect' },
dev: { role: 'developer' },
},
});
await team.run('Add rate limiting to the API');Supported Providers
| Provider | Type | Models |
|----------|------|--------|
| Anthropic | anthropic | Claude 4.5, Claude 4, Claude 3.5 |
| OpenAI | openai | GPT-4o, GPT-4, o1, o3 |
| Google | gemini | Gemini 2.5, Gemini 2.0 |
| Ollama | ollama | Any local model |
| Together AI | together | Llama, Qwen, DeepSeek |
| Groq | groq | Llama, Mixtral |
| Fireworks | fireworks | Llama, Qwen |
| Perplexity | perplexity | Sonar models |
| OpenRouter | openrouter | Multi-provider routing |
Requirements
- Node.js >= 18
- Peer dependencies:
@compilr-dev/agents^0.3.14,@compilr-dev/agents-coding^1.0.2
Related Packages
| Package | Description | |---------|-------------| | @compilr-dev/cli | AI-powered coding assistant for your terminal | | @compilr-dev/agents | Multi-LLM agent library | | @compilr-dev/agents-coding | Coding-specific tools and language analysis |
Links
License
MIT - See LICENSE for details.
