Manage agents (Flows)

Call the API

Once your agent is working in the Playground, you can call it from your own application. The Call Agent tab in the right panel gives you everything you need: the endpoint, credentials, and a ready-to-copy code snippet.

Finding your credentials

Open the agent graph and click the Call Agent tab in the right panel. The panel displays:

FieldWhat it is
Agent IDThe unique identifier for this agent. Pass it in the request URL
Project IDThe project this agent belongs to. Required as a header on every request
Endpoint URLThe full streaming endpoint for this agent
API KeyA project-scoped API key for authenticating requests

Use the copy button next to each field to copy individual values.

Code snippets

Select a language — JavaScript, Python, or cURL — and copy the snippet. Each snippet is pre-filled with your agent ID, project ID, endpoint, and a placeholder for your API key.

The snippets target the streaming endpoint, which returns responses as Server-Sent Events. Each event is a JSON object with a type field indicating what kind of update it is — a status change, a content chunk, a tool call, or a completed response.

The streaming endpoint

Agents run as streaming calls. Your application sends a POST with the user's message and receives a stream of events back. The stream stays open until the agent completes its run or an error occurs.

A minimal request looks like:

POST {endpoint} x-project-id: {projectId} Authorization: Bearer {apiKey} Content-Type: application/json { "message": "What's the status of order #1234?", "sessionId": "user-session-abc" }

Pass a consistent sessionId across messages from the same user. Anter uses it to maintain conversation memory — the agent remembers what was said earlier in the session.

Session memory

Each unique sessionId has its own conversation history. Messages from the same session ID build on each other; a new session ID starts fresh. Session memory is retained for seven days of inactivity.

Project API keys

API keys shown here are project-scoped — they authenticate requests to any agent in the project. Manage and rotate project API keys from the project settings in the Admin dashboard.