> ## 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.

# Custom Python Adapter

Use the custom adapter when your agent is a plain Python function or class.

## Manifest

```yaml theme={"theme":{"light":"min-light","dark":"min-dark"}}
runtime:
  adapter:
    type: "custom"
    entry_point: "src.main:agent"
```

## Supported Shape

The entry point can be an object with an `invoke` method:

```python theme={"theme":{"light":"min-light","dark":"min-dark"}}
class Agent:
    def invoke(self, inputs: dict, **kwargs) -> dict:
        return {"output": "Hello"}

agent = Agent()
```

Or a callable function, depending on the template and runtime wrapper.

## Input and Output

Inputs come from `interface.input` and are passed as a dictionary. Return a JSON-serializable dictionary so the Store can render the result.

## Best For

* Lightweight agents.
* API wrappers.
* Text transformation.
* Existing Python code you want to publish quickly.
