This guide explains how to onboard agents
CORAL_CONNECTION_URL
environment variable.
Here are some example snippets for popular Python frameworks:
.env
files by default (unless using
devmode), since environment variables should only be provided by Coral
Server.systemPrompt
parameter to agents - intended to allow extra text to be injected to those agents’ system prompts.
To support this feature, read the CORAL_PROMPT_SYSTEM
environment variable - and interpolate it into your existing prompt.
CORAL_PROMPT_SYSTEM
is being set.executable
), with plans to support Kubernetes, Phala, and more.
Docker
application.yaml
Executable
application.yaml
. It is not expected for users of your agent to modify this registry snippet directly (except for the name of it in their registry).
application.yaml
has two parts, the options
, and the runtime
:
options
are a list of user configurable options you want to expose.
Each option has:
API_KEY
, MODEL_TEMPERATURE
, MODEL_PROVIDER
)default
field is defined.
The type of this is a number or string, depending on what type
is set to.Docker
image
should be the docker image Coral Server should pull and use. It should be the same URL you would pass to docker pull [image]
Executable
command
should be an array of strings that represent the command Coral Server should run, to run your agent.environment
field, which is a list of environment variables we want to pass in during orchestration. This is also how you pass defined options to agents.
There are a few ways to declare an environment variable:
CORAL_CONNECTION_URL
-> The URL of the MCP server this agent must connect to,CORAL_AGENT_ID
-> The ID of this agent,CORAL_ORCHESTRATION_RUNTIME
-> How this agent is being orchestrated ("docker"
, "executable"
),CORAL_SESSION_ID
-> The ID of the session this agent belongs to,CORAL_SSE_URL
-> CORAL_CONNECTION_URL
, but without any query parameters
CORAL_CONNECTION_URL
instead, whenever possible./devmode/[appId]/[privKey]/[sessionId]/see?agentId=[agentId]
- and automatically have a session with that ID created (if it doesn’t already exist), and be registered with the provided agentId
.
appId
, privKey
& sessionId
can be anything, they just need to be
identical between agents you want to be in the same session/devmode/...
url when the CORAL_CONNECTION_URL
environment variable is not set.
You can also check that the CORAL_ORCHESTRATION_RUNTIME
environment variable, and load a .env
file if it isn’t set. This makes it easy to provide API keys, etc. to agents you run directly - since through orchestration those would normally be passed in when creating a session.
.env
files in your agents, you must make sure you are not running in orchestration (by checking CORAL_ORCHESTRATION_RUNTIME
for example) before loading them.Loading environment variables externally under orchestration can cause hard to debug issues like unintentionally used or accidentally shared API keys at best, and connection issues between the agent and the server at worst.