Starting with Agents
Connect Hermes or OpenCode to K-EXAONE 2.5. This guide walks through installation, model configuration and running the agent, in order.
Connecting an Agent
This guide shows how to connect K-EXAONE 2.5's reasoning and tool calling to an agent. Check the prerequisites, then select the agent you want to use.
Prerequisites · EXAONE API key · Authentication · Local project to work in
Set the API key environment variable
In the terminal where you will run the agent, set your API key as an environment variable.export EXAONE_API_KEY="YOUR_API_KEY"Install Hermes.
Run the official install command in a terminal on Linux, macOS, or WSL2.
curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bashRegister the EXAONE provider.
Merge the providers and agent sections below into your existing configuration in ~/.hermes/config.yaml. The API key is read from the EXAONE_API_KEY environment variable.
# Merge the `providers` and `agent` sections below into your existing configuration in `~/.hermes/config.yaml`
providers:
exaone:
api: https://api.exaone.ai/v1
key_env: EXAONE_API_KEY
transport: chat_completions
default_model: k-exaone_v2.5
extra_body:
temperature: 1.0
top_p: 0.95
agent:
reasoning_effort: mediumReasoning effort · Set agent.reasoning_effort to one of low, medium, high and max. The example above uses medium.
Select a model and run Hermes.
Run hermes model to select the exaone provider you registered and a model, then run Hermes from your project directory.
# Select the exaone provider you registered and a model.
hermes model
# Start from your project directory.
hermesSwitch models in a running session
/model custom:exaone:k-exaone_v2.5Try it out · Build a to-do list
No input files are needed. Run it in a new working directory with the model settings above applied.
hermes chat -q \
"Build a to-do list as a web page.
Each task should be able to be added, completed, and deleted.
Include CSS and JavaScript, and make sure it opens in a browser without any external dependencies."Open the generated HTML file in a browser and check that adding, completing, and deleting tasks work as expected.
Install OpenCode.
Install the latest version of OpenCode from a terminal where Node.js and npm are available.
npm install -g @opencode/cliAdd the model configuration to your project.
Merge the following into your project's opencode.json. Put connection details in settings, tool and reasoning support declarations in capabilities, and the arguments to pass to the model in body.
{
"$schema": "https://opencode.ai/config.json",
"model": "exaone/k-exaone_v2.5",
"providers": {
"exaone": {
"package": "@opencode/ai/providers/openai-compatible",
"name": "EXAONE",
"settings": {
"baseURL": "https://api.exaone.ai/v1",
"apiKey": "{env:EXAONE_API_KEY}"
},
"models": {
"k-exaone_v2.5": {
"name": "K-EXAONE 2.5",
"capabilities": {
"tools": true,
"input": [
"text"
],
"output": [
"text"
],
"temperature": true,
"reasoning": {
"supported": true
}
},
"compatibility": {
"reasoningField": "reasoning_content"
},
"body": {
"reasoning_effort": "medium",
"temperature": 1.0,
"top_p": 0.95
}
}
}
}
}
}Reasoning history · compatibility.reasoningField specifies the reasoning field to read from the stream and pass back in the assistant history of the next request.
Run OpenCode with K-EXAONE.
In a terminal where your API key environment variable is set, navigate to your project directory. Use --standalone to run OpenCode together with a server that uses the current terminal's environment variables. The model in the configuration above is used as the default model. You can also select a model with /models during a session.
opencode --standaloneTry it out · Build a to-do list
No input files are needed. Run it in a new working directory with the model settings above applied.
opencode run --standalone \
--model exaone/k-exaone_v2.5 \
"Build a to-do list as a web page.
Each task should be able to be added, completed, and deleted.
Include CSS and JavaScript, and make sure it opens in a browser without any external dependencies."Open the generated HTML file in a browser and check that adding, completing, and deleting tasks work as expected.
Model Configuration
reasoning_effort sets how much reasoning the model performs before generating a response. The intensity increases from low to medium to high to max and higher values may increase response time and token usage.
| Value | Reasoning intensity | When to use |
|---|---|---|
low | Low | Simple requests where a fast response matters most. |
medium | Medium | General analysis and code writing, balancing response time and reasoning depth. |
high | High | Complex problem solving or debugging that needs deeper reasoning. |
max | Highest | Difficult tasks where thorough review matters more than speed. |
The integration examples above use medium. To change it, update agent.reasoning_effort in Hermes or body.reasoning_effort in OpenCode.
Keep reasoning intensity separate from history passing.
reasoning_effort controls the reasoning intensity for the current response only. Passing the previous assistant turn's reasoning and tool-call history to the next request is handled separately by the agent, independent of this parameter.
Check the generation settings.
temperature and top_p are sampling parameters that control how the model selects the next token. They work independently of the reasoning intensity (reasoning_effort). Also make sure that the conversation history plus the generated output stays within the maximum context length.
Agent Workflow: Reasoning, Tool calling and Streaming
The agent chains together the model reasoning, tool execution, and the next request into a single loop. When integrating, verify that the following three flows work as expected.
| Reasoning | reasoning_effort sets the reasoning intensity. Verify reasoning streaming and the passing of reasoning history to the next request separately. |
| Tool calling | The harness executes the calls returned by the model and passes the results back. Verify that a single tool call leads through to the final answer. |
| Streaming | The harness handles text, reasoning, and tool-call deltas. Verify that tools run only after their arguments are complete, and that the flow continues into the next turn. |
When calling the API directly, request streaming with stream: true. Verify the harness's streaming behavior against the execution path of the version you are using.
Further Reading
The following external agents can be used with the OpenAI-compatible EXAONE API.
| Hermes · Custom provider ↗ | Provider registration and extra arguments |
| OpenCode · Custom provider ↗ | Provider registration and request body |
| OpenCode · Models & Reasoning ↗ | Model capabilities and reasoning history |