LLM SDKs give you chat. Sandbox providers give you containers. noumen is everything in between — the tool loop, file editing, shell execution, and session management that turn a language model into a coding agent.
pnpm add noumenThe tool loop, session management, and virtual infrastructure that every coding agent needs — so you don't have to build it yourself.
ReadFile, WriteFile, EditFile, Bash, Glob, Grep — the same tools shipping inside production coding agents, wired up and ready to go.
OpenAI, Anthropic, Google Gemini. Same streaming interface, same tool dispatch, same results. Bring your own keys.
Local Node.js, remote containers via sprites.dev, or implement VirtualFs yourself. The agent doesn't care where it runs.
Conversations save as JSONL. Auto-compaction keeps context under control. Resume any thread by ID, right where you left off.
Inject markdown instructions into the system prompt. Load SKILL.md files from the filesystem. Shape behavior without changing code.
Client and server support for Model Context Protocol. Expose external tools and resources to the agent seamlessly.
Pick a provider, point at a filesystem, and start streaming events. The serpent handles the rest.
import {
Code,
OpenAIProvider,
LocalFs,
LocalComputer,
} from "noumen";
const code = new Code({
aiProvider: new OpenAIProvider({ apiKey: process.env.OPENAI_API_KEY }),
virtualFs: new LocalFs({ basePath: "/my/project" }),
virtualComputer: new LocalComputer({ defaultCwd: "/my/project" }),
});
const thread = code.createThread();
for await (const event of thread.run("Add a health-check endpoint")) {
switch (event.type) {
case "text_delta":
process.stdout.write(event.text);
break;
case "tool_use_start":
console.log(`\n[tool] ${event.toolName}`);
break;
case "tool_result":
console.log(`[result] ${event.result.content.slice(0, 200)}`);
break;
}
}One interface. Three providers. Same streaming, same tool dispatch, same results. Pick the model that fits.
gpt-4oclaude-sonnet-4gemini-2.5-flashpnpm add noumenimport { Code, OpenAIProvider } from "noumen"