Testing Locally
Before publishing an agent, you’ll want to test it thoroughly. Selu provides a local development workflow that mirrors the production environment as closely as possible.
Starting the dev server
Section titled “Starting the dev server”From your agent directory, run:
selu dev .This command:
- Validates
agent.yamlandagent.md. - Builds any local capability Docker images.
- Starts the orchestrator with your agent loaded.
- Opens a web chat interface at
http://localhost:4840.
Viewing logs
Section titled “Viewing logs”All orchestrator and capability logs are streamed to your terminal. You can also inspect them with:
selu logs # all logsselu logs --capability weather # filter by capability nameselu logs --level debug # include debug outputCapability containers write to stdout/stderr, which the orchestrator captures and prefixes with the capability name.
Testing with the CLI
Section titled “Testing with the CLI”For quick, non-interactive testing, use selu chat:
selu chat . "What's the weather in Berlin?"This sends a single message, prints the agent’s response (including any tool calls), and exits. Useful for scripting and CI.
Snapshot testing
Section titled “Snapshot testing”Selu supports snapshot tests — pre-recorded conversations that verify your agent’s behaviour doesn’t regress.
selu test snapshot create --name "greeting" .# Interactive chat session opens — type your test conversation# Press Ctrl+D to saveselu test snapshot run .The CLI replays each recorded conversation, compares tool calls and response structure, and reports pass/fail.
Debugging capabilities
Section titled “Debugging capabilities”If a capability isn’t behaving as expected:
- Check health —
selu statusshows the state of each running capability container. - Manual gRPC call — Use
grpcurlto invoke the capability directly:Terminal window grpcurl -plaintext -d '{"tool_name": "weather_lookup", "parameters": "{\"location\": \"Berlin\"}"}' \localhost:50051 selu.capability.v1.CapabilityService/Invoke - Shell into the container —
docker exec -it selu-cap-weather /bin/sh
Environment variables
Section titled “Environment variables”Capabilities that need API keys or configuration can read from environment variables. Set them in a .env file in your agent directory:
WEATHER_API_KEY=your-api-key-hereThe dev server automatically loads .env and passes the variables to capability containers.
Next steps
Section titled “Next steps”Once your agent works locally, review the Marketplace Guidelines to prepare for publication.