Deploy TEN agent service
After customizing your agent through the playground or by editing property.json
directly, you can deploy it as a production service. This guide walks you through creating a release Docker image and running your agent service.
Prerequisites
Before deploying, ensure you have:
- Completed agent configuration
- Docker installed on your deployment machine
- Access to your
.env
file with required API keys
Build the Docker image
Create a production-ready Docker image of your agent service using the provided Dockerfile in the project root.
Standard build
Build the default agent configuration:
For Apple Silicon machines, specify the platform:
Custom agent builds
To build specific agent configurations like demo or experimental versions, use the optional USE_AGENT
build argument:
Run the service
Launch your agent service container with the necessary configuration:
Your agent service is accessible on port 8083.
Test the deployment
Verify your deployment is working correctly using the following methods.
API testing
The service exposes REST APIs for agent interaction. Find the complete API reference at TEN Agent Server Documentation.
Playground testing
Test your deployed service using the playground client:
- Set
AGENT_SERVER_URL
to your service location. Replacelocalhost
with your server IP for remote deployments. - Set
NEXT_PUBLIC_EDIT_GRAPH_MODE
tofalse
since the production image doesn't include the development server.
Deploy with playground UI
For a complete deployment including the playground interface, follow these additional steps.
Build playground image
Navigate to the playground directory and build the UI image:
Run playground container
Launch the playground container configured to connect to your agent service:
- Use
host.docker.internal
when the agent service runs in another Docker container on the same machine. - For remote deployments, replace with your server's IP address.
- Always set
EDIT_GRAPH_MODE
tofalse
for production deployments.