arcie
v0.4.6
Published
The electronic line — build agents at the speed of light.
Maintainers
Readme
Arcie
The electronic line — build agents at the speed of light.
Site: cencori.com/arcie · Docs: cencori.com/arcie/docs
npx arcie@latest init my-agentmy-agent/
├── agent/
│ ├── agent.ts # model + config
│ ├── instructions.md # system prompt
│ ├── tools/ # what it can do
│ ├── knowledge/ # what it knows
│ ├── subagents/ # who it delegates to
│ ├── channels/ # HTTP, Slack, WhatsApp
│ ├── schedules/ # recurring jobs
│ ├── sessions/ # memory + session config
│ └── policies/ # guardrails, budgets, security
├── ui/ # the frontend — optional, prewired
│ ├── app.tsx # your UI (default: <AgentChat />)
│ └── theme.ts # design tokens
├── arcie.json # project + runtime manifest
├── package.json
└── tsconfig.jsonThe frontend ships with arcie — no Next.js, no bundler config, no second
framework. arcie init scaffolds a working ui/, arcie dev serves it next to
the agent on one port, and arcie build compiles it to static assets alongside
the runtime:
// ui/app.tsx — yours to change
import { AgentChat } from "arcie/ui";
export default function App() {
return <AgentChat />;
}arcie dev one port: your ui/, /invoke, and the local gateway
edits to ui/* rebuild and refresh the browser
arcie build
→ .arcie/server.mjs the headless runtime
→ .arcie/static/ index.html, app.js, app.cssCompose the arcie/ui kit, drop in your own components, or rebuild the surface
entirely on the useChat hook — it stays one build either way. Delete ui/ and
the default chat page serves instead.
The same components also build to a standalone <agent-chat> web component, so
you can embed an agent in a page you already own with a plain script tag:
<script src="https://unpkg.com/arcie/dist/web/agent-chat.js"></script>
<agent-chat endpoint="/invoke"></agent-chat>How it works
agent.tsdefines the model and config- Loader discovers
tools/,subagents/,instructions.md,sessions/config.ts,policies/index.tsand merges them with inline config - Runner creates a Cencori session, sends turns with instructions + tool definitions, and processes the SSE event stream
- Tool execution happens locally — the model requests a tool call, the runner executes it, and results are sent back to Cencori to continue the turn
- Memory processors run before/after each turn to manage context
- Hooks fire at lifecycle events
- Policies enforce guardrails, blocked tools, and allowed models at every turn
For local development, arcie ships a built-in LLM server (arcie dev) that supports OpenAI, Anthropic, Groq, DeepSeek, Mistral, Google, and Together — no Cencori dependency required.
Quick Start
npx arcie@latest init my-agent
cd my-agent
npm run devOpens a web chat UI at http://localhost:3000, served by the built-in <agent-chat> widget — no Next.js, no separate web app.
Authoring
// agent/agent.ts
import { defineAgent } from "arcie";
export default defineAgent({
model: "claude-sonnet-4-5",
cencori: {
billing: { budget: "50.00/month" },
},
});// agent/tools/get_weather.ts
import { defineTool } from "arcie/tools";
import { z } from "zod";
export default defineTool({
description: "Get the current weather for a city.",
inputSchema: z.object({ city: z.string() }),
async execute({ city }) {
return { city, condition: "Sunny", temperatureF: 72 };
},
});Programmatic API
import { createAgent } from "arcie";
const agent = createAgent({
model: "gpt-4o",
tools: {
greet: {
description: "Greet someone",
execute: ({ name }) => `Hello, ${name}!`,
},
},
});
const reply = await agent.generate("Say hi to Alice");Subagents
Drop a specialist under agent/subagents/<id>/:
agent/subagents/researcher/
├── agent.ts # defineAgent({ model, description })
├── instructions.md # optional
└── tools/ # optionalEach subagent runs in a fresh, isolated session — the parent never sees the child's history. See docs/subagents.md.
Memory & Policies
// agent/sessions/config.ts
export default {
maxTurns: 50,
memory: { strategy: "lastN", limit: 20, workingMemory: true },
};// agent/policies/index.ts
export default {
inputGuards: ["no-email", "no-phone"],
blockedTools: ["dangerous_tool"],
allowedModels: ["claude-*", "gpt-4*"],
};Deploy
arcie build compiles the agent into a deployable that answers the Cencori Runtime Contract — a container exposing five HTTP routes on $PORT:
| Route | Purpose |
| --- | --- |
| GET /_health | readiness |
| POST /invoke | run one agent turn (JSON, NDJSON, or SSE) |
| POST /channels/:name | inbound channel event |
| POST /schedules/:name | fire a named schedule |
| GET /_manifest | the built agent manifest |
export CENCORI_API_KEY=sk_...
arcie build # → .arcie/manifest.json + .arcie/server.mjs (self-contained)
node .arcie/server.mjs # or: arcie serveThe bundled server.mjs boots the contract server for the agent — the Cencori pipeline containerizes it directly. Run it locally with arcie serve.
Docs
License
MIT
