Lampson as an engine
Lampson as an engine
Lampson is not just a terminal and a web UI for coding. Its agents can also be used from other applications, as an engine: a bot that answers your business's messages, your backend asking an agent something, another AI using your agents as a tool.
Underneath it is the same as always — the agent, its tools, its permissions, sessions and traces — with other ways in.
The ways in§
| Way in | What for | Page |
|---|---|---|
lampson run | a script or a cron job: a message goes in, the answer comes out (text or JSON events) | Headless |
HTTP API /v1 | your app or your backend, with an API key; answer as JSON, streamed or by callback | HTTP API |
| Channels | Telegram, WhatsApp and Instagram (via Chatwoot), or any you add as a plugin | Channels |
| MCP | Claude, Cursor, ChatGPT or another Lampson use your agents as a tool | Lampson as an MCP server |
| SDK | JavaScript/TypeScript (npm i lampson) and Python (pip install lampson) | SDK |
And what answers behind all those ways in are agents defined in files: a .json with its prompt, the exact tools it may use, its permissions and its model.
Use cases§
1. Serve your customers over chat. An agent with your catalog and your rules answers Telegram, or WhatsApp, Instagram and web chat through Chatwoot. Each customer gets their own conversation; if someone sends three messages in a row ("hi" / "how much is the bread?" / "is it in stock?"), they get one answer that covers everything. And it can take the whole order, with address, payment and order number. → Channels · Recipe: taking orders by chat
2. Put it in your app or your backend. A POST /v1/messages with an API key, or one line with the SDK. Your app decides what to ask; Lampson brings the agent, its tools and the conversation's memory. → HTTP API · SDK
3. Your employees already use an AI. Your business's agent plugs in as an MCP tool in Claude, Cursor or ChatGPT; your team asks it from there ("how much stock is left and what's this week's promo?") without opening another app, with the real information and rules. → Lampson as an MCP server
4. Give an AI sensitive data without giving it the keys. On your server, a Lampson agent with a read-only plugin and limited paths. An outside AI asks it "how many orders were there yesterday?" and gets the answer — never the database password.
5. Hand the heavy lifting to a cheap model. Your main AI asks a Lampson agent, running DeepSeek or local Ollama, to read 40 files and send back a summary. The cheap model pays.
6. Agents talking to agents, across companies. A restaurant's purchasing agent asks its supplier's agent for price and stock. Each with its own Lampson, its own API key and its own rules: one puts the other's URL in its mcp.json and its agent gains the mcp_proveedor_ask tool. → Agent ↔ agent
7. Agents that work by themselves, or as a team. Give an agent an objective ("add this feature with tests") and it works on it alone, in rounds, asking for your approval before anything irreversible. Or give it to a team with roles — CEO, CTO, Dev… — each on its own git branch, and nothing reaches main without you. → Objectives · Teams
What Lampson handles for you§
- One conversation per customer. Each
thread(a phone number, a chat, a ticket) is its own session, with its history. - One mailbox per conversation. Two turns never run at once on the same conversation; messages that arrive in a burst are merged into one turn, and whatever arrives while the agent works joins the turn in progress. → The mailbox
- Permissions with no human present. An agent with nobody to approve runs in
strict(anything dangerous is denied) unless you say otherwise; you can authorize specific tools one by one, or send approvals to your phone. → Agents - Traces. Every turn lands in its session's trace, wherever it came from.
Getting started§
1. Write an agent: .lampson/agents/tienda.agent.json in your project. → Agents 2. Try it headless: lampson run --agent tienda "hello". → Headless 3. Connect it: a channel (lampson channel on telegram), an API key (lampson key add --agent tienda) or the SDK.