Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.charmos.io/llms.txt

Use this file to discover all available pages before exploring further.

The Python template is the simplest way to build a Charm agent. It is a good fit for agents that call APIs, transform text, run lightweight data processing, or wrap an existing Python function.

Use Case

Use this template for a minimal Python agent with a small dependency surface.

Prerequisites

  • Python 3.10+.
  • Charm CLI.
  • Optional: Docker for isolated local runs.

Configuration Surface

The important charm.yaml fields are:
  • persona
  • interface
  • runtime.adapter
  • runtime.lifecycle
  • policies
Typical runtime configuration:
runtime:
  adapter:
    type: "custom"
    entry_point: "src.main:agent"
  mode: "standard"
  lifecycle: "serverless"
The entry point should resolve to an object or callable that the runner can invoke.

Expected Project Shape

my-agent/
├── charm.yaml
├── requirements.txt
└── src/
    └── main.py

Local Development

Run with a simple input:
charm run . --input "Summarize this idea"
Run with JSON input:
charm run . --json '{"message": "Summarize this idea"}'
Validate before publishing:
charm validate .

Run and Publish

charm run
charm validate
charm push

When to Choose Another Template