Agent Configuration
Making your agents configurable in the Open Agent Platform
Agent Configuration
To allow your agent to be configurable in Open Agent Platform, you must set custom configuration metadata on your agent’s configurable fields. There are currently three types of configurable fields:
- General Agent Config: This consists of general configuration settings like the model name, system prompt, temperature, etc. These are where essentially all of your custom configurable fields should go.
- MCP Tools Config: This is the config which defines the MCP server and tools to give your agent access to.
- RAG Config: This is the config which defines the RAG server, and collection name to give your agent access to.
This section assumes you have a basic understanding of configurable fields in LangGraph. If you do not, read the LangGraph documentation (Python, TypeScript) for more information.
General Agent Config
By default, Open Agent Platform will show all fields listed in your configurable object as configurable in the UI. Each field will be configurable via a simple text input. To add more complex configurable field types (e.g boolean, dropdown, slider, etc), you should add a x_oap_ui_config
object to metadata
on the field.
Inside this object is where you define the custom UI config for that specific field. The available options are:
Here’s an example in TypeScript of how to define this configuration:
And in Python, this would look like:
MCP Tools Config
To allow an agent to be configurable with MCP tools in Open Agent Platform, you must set a specific x_oap_config_type
metadata field on the configurable field. This field should be set to oap_mcp_tools_config
. You only need to set this on a single field in your configurable object. Optionally, you can provide a default value for this field, which will be used when the user is creating a new agent.
Here’s an example in TypeScript:
And in Python:
RAG Config
Configuring RAG is similar to MCP tools. You need to set a specific x_oap_config_type
metadata field on the configurable field. This field should be set to oap_rag_config
. You only need to set this on a single field in your configurable object.
Here’s an example in TypeScript:
And in Python:
Troubleshooting
If your configurable fields aren’t showing up correctly in the OAP UI, check the following:
- Make sure you’ve set the correct metadata fields on your configurable fields.
- Ensure your configurable field schema matches the expected schema.
- For select fields, make sure the options are formatted correctly.
- For validator functions, ensure they’re valid JavaScript functions.
- If it’s still not working, confirm your
x_oap_ui_config
metadata has the proper fields set.