> ## Documentation Index
> Fetch the complete documentation index at: https://docs.fact0.io/llms.txt
> Use this file to discover all available pages before exploring further.

# CAMEL AI

> Trace CAMEL role-playing sessions and audit agent actions.

# CAMEL AI

<Note>
  A native CAMEL handler is on the roadmap. The pattern below works with `camel-ai >= 0.2`.
</Note>

## Install

```bash theme={null}
pip install fact0-sdk camel-ai
```

## Pattern

One execution per role-play session, one span per turn.

```python theme={null}
import fact0
from camel.societies import RolePlaying

client = fact0.Client(api_key="f0_live_...")

session = RolePlaying(
    assistant_role_name="Engineer",
    user_role_name="Product Manager",
    task_prompt="Design an audit log SDK",
)

with client.telemetry.execution(agent_id="camel.design-session") as ex:
    input_msg = session.init_chat()
    for turn in range(8):
        with ex.span(f"turn-{turn}", span_type="MODEL_INVOCATION") as span:
            assistant_response, user_response = session.step(input_msg)
            span.complete(output={
                "assistant": assistant_response.msg.content[:400],
                "user": user_response.msg.content[:400],
            })
        if assistant_response.terminated:
            break
        input_msg = assistant_response.msg
```

## Related

* [Concepts: executions](/concepts/executions)
* [AutoGen](/integrations/autogen) for multi-agent conversations
