Deploy to akka.io
New to Akka? Start here: Use the Build your first agent guide to get a simple agentic service running locally and interact with it. |
You’ve built and tried the service locally, it’s time to run it on the Akka Agentic Platform without having to change any code.
-
If you have not already done so, install the Akka CLI.
-
Authenticate the CLI with your Akka account:
akka auth login
-
Build a container image of your service:
mvn clean install -DskipTests
-
Take note of the container name and tag from the last line in the output, for example:
DOCKER> Tagging image helloworld-agent:1.0-SNAPSHOT-20250630102843 successful!
-
Set up secret containing the API key:
akka secret create generic openai-api --literal key=$OPENAI_API_KEY
-
Deploy your service, replacing:
-
container-name
with the container name from themvn install
output in the previous step -
tag-name
with the tag name from themvn install
output in the previous step
akka service deploy helloworld-service helloworld-agent:tag-name --push \ --secret-env OPENAI_API_KEY=openai-api/key
Your service named
helloworld-service
will now begin deploying. -
-
Verify the deployment status of your service:
akka service list
A service status can be one of the following:
-
Ready: All service instances are up-to-date and fully available.
-
UpdateInProgress: Service is updating.
-
Unavailable: No service instances are available.
-
PartiallyReady: Some, but not all, service instances are available. Approximately one minute after deploying, your service status should become Ready.
-
-
Expose your service to the internet:
akka service expose helloworld-service
Should respond with something similar to (the exact address will be unique to your service):
Service 'helloworld-service' was successfully exposed at: spring-tooth-3406.gcp-us-east1.akka.services
Congratulations! You have successfully deployed your service. You can now access it using the hostname described in the output of the command above.
Invoke your deployed service
You can use cURL to invoke your service, replacing URL with the hostname from the previous step.
Make an HTTP request to the service:
curl -i -XPOST --location "https://spring-tooth-3406.gcp-us-east1.akka.services[http://localhost:9000]/hello" \
--header "Content-Type: application/json" \
--data '{"user": "alice", "text": "Hello, I am Alice"}'
Explore the console
-
Open the Akka Console.
-
Navigate to the Project where the Service is deployed.
-
Click on the Service card of the Service. It shows detailed information about the running service.
Next steps
-
Read about other deployment options in Operating
-
Learn more details about Deploy and manage services