sypho build
Build an agent Docker image with auto-discovery of entrypoints and tools.
Usage
sypho build --version <VERSION> [OPTIONS]
Options
| Flag | Description |
|---|---|
--version <VERSION> | Image version tag (required) |
What It Does
- Auto-Discovery: Runs
auto_package.pyto scan code for@entrypointand@tooldecorators - Generates Manifest: Creates
manifest.jsonwith agent configuration - Builds Image: Runs
docker buildwith generated Dockerfile - Tags Image: Names image as
{agent-name}:{version}
Example
cd my-agent
sypho build --version 0.1.0
Output:
🔍 Discovering entrypoints and tools...
✓ Found 1 entrypoint: main
✓ Found 2 tools: example_tool, fetch_data
📦 Building Docker image...
[+] Building 12.3s (10/10) FINISHED
✓ Built: my-agent:0.1.0
Generated Manifest
builds/my-agent/0.1.0/manifest.json:
{
"schema_version": "1.0",
"agent_name": "my-agent",
"version": "0.1.0",
"execution_mode": "agent",
"agent_config": {
"model": "anthropic/claude-3-5-sonnet-20241022",
"max_tokens": 4096,
"max_iterations": 10,
"system_prompt": "You are a helpful assistant."
},
"entrypoints": {
"main": {
"tools": ["example_tool", "fetch_data"],
"local_tools": []
}
}
}
Docker Image
Uses multi-stage build:
- Install Python dependencies
- Copy agent code
- Set entrypoint to SDK runtime
Local Testing
# Verify image
docker images | grep my-agent
# Run locally
docker run my-agent:0.1.0
Troubleshooting
Auto-discovery fails
Ensure decorators are used correctly:
from sypho_sdk import entrypoint, tool
@entrypoint # Required
async def main(input: dict, context: AgentContext):
...
Docker build fails
Check Dockerfile and requirements.txt are present.