Skip to main content
The Chat API gives you a streaming conversational agent that can take action on your behalf — running market research, expanding build nodes, kicking off Forge coding runs, and calling any connected integration like Linear, Slack, or GitHub. Every message you send streams back NDJSON events as the agent thinks, calls tools, and composes its reply. Sessions are persisted automatically so you can resume a conversation at any time.

Start a chat

POST /chat is the primary endpoint. It accepts your message history and streams back a sequence of NDJSON events until the agent finishes its reply.
This endpoint uses Stream auth. Your session token’s TTL is extended on connect so long-running agentic turns don’t expire mid-stream.
Rate limit: 20 requests per minute.
object[]
required
Full conversation history. Each message has a role (user or assistant) and content string (max 50,000 characters per message).
string
required
The product idea the conversation is focused on. Max 50,000 characters. The agent uses this as persistent context for all tool calls.
string
UUID of an existing project to scope tool calls (research, build graphs) to. When set, the server prepends the project’s one-line digest to the agent’s system prompt so the agent knows what’s been happening in that project. Pass null to work without a project — the agent falls back to the user’s most recently active project (within the last 24 hours) when one is needed.
string
ID of an existing session to continue. Pass null to start a new session — the server mints one and sends it back in the stream_start event.
boolean
default:"false"
Tell the agent whether completed research exists for this project. Helps it decide whether to call run_research or query_research first.
boolean
default:"false"
Tell the agent whether a build graph exists. Helps it choose between expand_build_node and other tools.
string
Pre-loaded research text to inject into the agent’s context window. Max 100,000 characters. Useful when you want to avoid a query_research round-trip.

Stream events

The response is Content-Type: application/x-ndjson. Each line is a complete JSON object: {"v": 1, "event": "<type>", "data": {...}}.
Parse on the event field and silently ignore any event types you don’t recognize. New events may be added without a version bump.
card.* events are persisted alongside other session events, so they replay correctly when you re-open a session via GET /chat/sessions/{id}.

Built-in agent tools

The agent has access to the following tools on every request. Composio tools (GitHub, Linear, Slack, Notion, etc.) are discovered at runtime based on the user’s connected accounts — the agent can invoke any of 1000+ tools without a hardcoded list.
When run_research, expand_build_node, or start_implementation run, the server bridges their pipeline stage events as tool_progress events — you see the full real-time progress inline in the chat stream.
run_research from chat is dispatched through the same background workflow runner as POST /research, so chat-initiated research uses identical pipeline behavior and capacity to direct API calls. The agent waits up to 180 seconds for the pipeline to emit done. If the pipeline hasn’t completed in that window the tool returns {"status": "timeout", ...} to the model — the underlying research job continues running in the background and can be polled or streamed via the standard research endpoints.
deep_research_features is fire-and-forget: the agent dispatches the job through the same background workflow runner as POST /feature-research and returns immediately with {"job_id": "...", "status": "queued"}. Subscribe to GET /feature-research/{job_id}/events to stream progress, or poll GET /feature-research/{job_id}/status.

Sessions

List sessions

number
default:"20"
Maximum sessions to return. Range: 1–100.
number
default:"0"
Pagination offset.
200 response

Get a session

Returns the session object plus its full persisted event log, which you can use to replay or display conversation history.
200 response

Delete a session

Permanently deletes the session and its event log.
Returns 204 No Content on success.

Memory

The agent stores durable memories across sessions — things like preferred naming conventions, team context, and past decisions. Memories are scoped to a project when project_id is provided.

List memories

string
Scope memories to a specific project UUID. Omit to list all memories.
number
default:"20"
Maximum memories to return. Range: 1–100.
200 response

Clear memories

Removes all memories for the given scope. Omit project_id to clear all memories across every project.
This action is irreversible. The agent will lose context it has accumulated over past conversations.
200 response