Agentak
AI chat that works with your page.
import { mountChat } from "agentak";
import { createPiSession } from "agentak/pi";
const session = createPiSession({
history: true,
page: true, // discover this page's WebMCP tools
});
mountChat("#chat", { session });
#Try it on this page
Open Ask AI in the corner. That is the real ChatPanel, not a demo. Use a provider of your
choice, run a model on your device, or add your own key.
Everything runs in the browser: the agent loop, the transcript, the tools, and the history. There is no Agentak server between you and the provider.
Agentak also connects the agent to the page. Set page: true and it discovers the
structured tools that the page publishes through WebMCP. The tool list stays current as a
single-page application changes, read-only annotations control approvals, and untrusted
results are clearly marked.
Ready out of the box:
- streaming text, reasoning, Markdown, code, images, and tool results
- provider, model, key, and thinking-level settings
- typed host tools and WebMCP page tools with approval and trust controls
- queued messages, stop, retry, and readable errors
- context and cost, generated titles, and stored conversations
- copy, read aloud, safe links, slash commands, and mobile keyboards
- light and dark tokens, inline styles, no shadow root
#Give the agent tools from the page
A page can publish actions such as Search products, Read the current record, or
Add an item to the cart on document.modelContext. Agentak maps them to provider-safe
Pi tools and shows each call and result in the chat.
const session = createPiSession({
page: true,
});The same support works in the Chrome side panel. It discovers tools in the active tab,
runs them in that page, and refreshes them after navigation or a toolchange event.
Learn how Agentak maps WebMCP tools →
#Pick your setup
Use the Pi agent
Direct providers, local models, tools, approvals, and storage. Included.
Bring your own agent
Any backend or client runtime, through the small ChatSession interface.
Own the whole view
Drive ChatView with your own transcript, or compose the exported parts.
#One package, six entry points
Import only what you use. The UI and the agent ship apart, so Pi enters your bundle only when you ask for it.
import { mountChat } from "agentak"; // the chat, tokens, and session types
import { createPiSession } from "agentak/pi"; // the agent: providers, tools, storage
import { ChatPanel } from "agentak/react"; // or /vue, or /preact
import { Message } from "agentak/components"; // every part, on its own#Also a Chrome side panel
The same chat, next to every tab. It follows the active tab, reads the page with
read_active_tab, finds WebMCP tools, and keeps a separate conversation shelf per site.
Unzip it, open chrome://extensions, turn on Developer mode, and choose Load
unpacked. The Chrome extension guide covers permissions and browser
behavior.
Everything a browser agent needs
Browser-native runtime
No Agentak server is required. Run a local model or call a provider directly from the page.
Included Pi agent
Streaming, reasoning, providers, model selection, tool calls, approvals, usage, and errors in one session.
On-device models
Use Chrome Built-in AI or run small GGUF models through llama.cpp and WebAssembly with wllama.
Complete chat UX
Markdown, code, thinking, tool output, queues, retry, copy, read aloud, slash commands, and mobile keyboard support.
WebMCP page tools
Turn on one option to discover structured tools from document.modelContext and keep the tool list current as the page changes.
Your framework or none
Use React, Vue, Preact, plain JavaScript, or connect the UI to a custom agent through ChatSession.