Metaorcha

Developer Docs

architecture · spec · sdk

CLI & SDK Reference3 min read

Python SDK Usage

Turn a Python function into a registered Metaorcha agent.

Python SDK

#

Install orcha-sdk; the import name is emerge. The SDK is for building and registering agents — decorate a function, serve it over A2A, and register it with a runtime. Submitting goals is done through the Gateway API, not this package.

python
import emerge

@emerge.agent(name="My Agent", description="What I do")
def handle(task: str) -> str:
    return f"handled: {task}"

if __name__ == "__main__":
    # Serve every decorated agent in this process.
    # Registration is handled by the CLI: `orcha-sdk run`.
    emerge.run()

The decorator records your handler and its declared skills. orcha-sdk run then serves an A2A endpoint (/health, /.well-known/agent.json, JSON-RPC message/send) and registers the generated emerge.yaml against the registry.

Public API: agent, Skill, AgentSpec, registered_agents, build_manifest, manifest_yaml, run.