Skip to main content

sypho init

Create a new agent project with proper structure and example code.

Usage

sypho init <NAME>

Arguments

ArgumentDescription
NAMEAgent project name

Example

sypho init weather-agent
cd weather-agent

Generated Structure

weather-agent/
├── src/
│ └── agent.py # Main agent code with @entrypoint
├── Dockerfile # Multi-stage Python build
├── requirements.txt # Dependencies (sypho-sdk)
└── .gitignore

Generated Code

src/agent.py:

from sypho_sdk import entrypoint, tool, AgentContext

@tool
async def example_tool(text: str, uppercase: bool = False):
"""An example tool that processes text"""
return text.upper() if uppercase else text.lower()

@entrypoint
async def main(input: dict, context: AgentContext):
"""Main agent entrypoint"""
message = input.get("message", "Hello")
result = await context.call_tool("example_tool", {
"text": message,
"uppercase": True
})
return {"result": result}

Next Steps

After init:

# 1. Customize agent code
vim src/agent.py

# 2. Build the image
sypho build --version 0.1.0

# 3. Deploy
sypho deploy --version 0.1.0

See Also