Skip to main content

SDK oficial da Camile AI — plataforma de IA empresarial

Project description

Camile AI — SDK Python

PyPI Python Versions License

SDK oficial da Camile AI — plataforma de IA empresarial com agentes autônomos, RAG, capacidades modulares e multi-tenancy.

Instalação

pip install camile-ai

Uso Básico

Chat

from camile import CamileAI

client = CamileAI(api_key="cml_live_sua_chave_aqui")

response = client.chat.completions.create(
    messages=[
        {"role": "system", "content": "Você é um assistente útil."},
        {"role": "user", "content": "Qual é a capital do Brasil?"},
    ],
    model="camile-v1",
)

print(response.choices[0]["message"]["content"])
# → Brasília

Agentes

# Listar agentes
agents = client.agents.list()
for agent in agents:
    print(f"{agent.id}: {agent.name}")

# Criar agente
agent = client.agents.create(
    name="Atendimento",
    description="Agente de atendimento ao cliente",
)

# Executar agente
result = client.agents.execute(
    agent_id=agent.id,
    input="Qual o horário de funcionamento?",
)
print(result["response"])

Capacidades

# Catálogo de capacidades
caps = client.capabilities.list()
for cap in caps:
    print(f"  {cap.icon or '🔧'} {cap.name}{cap.description}")

# Vincular capacidade a um agente
client.capabilities.attach(agent_id="ag_xxx", slug="web-search")

RAG (Busca Semântica)

# Criar coleção de conhecimento
col = client.rag.create_collection(
    name="Base de conhecimento",
    description="Documentos da empresa",
)

# Buscar informações
results = client.rag.search(
    collection_id=col.id,
    query="Qual o prazo de entrega?",
    top_k=5,
)
for r in results:
    print(f"[{r.score:.2f}] {r.text[:100]}...")

Memória do Agente

# Salvar memória
client.memory.save(
    agent_id="ag_xxx",
    content="Cliente prefere atendimento via WhatsApp",
    type="long_term",
)

# Consultar
memories = client.memory.list(agent_id="ag_xxx")
for mem in memories:
    print(f"  • {mem.content} ({mem.type})")

Documentação

Documentação completa: docs.camile.ia.br

Desenvolvimento

# Clone o monorepo
git clone https://github.com/CamileAI/camile.git
cd camile/api/sdk/python

# Instale em modo editável
pip install -e .

# Teste
python -c "from camile import CamileAI; print('SDK carregado com sucesso')"

Licença

MIT © Camile AI

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

camile_ai-0.1.0.tar.gz (10.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

camile_ai-0.1.0-py3-none-any.whl (13.0 kB view details)

Uploaded Python 3

File details

Details for the file camile_ai-0.1.0.tar.gz.

File metadata

  • Download URL: camile_ai-0.1.0.tar.gz
  • Upload date:
  • Size: 10.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for camile_ai-0.1.0.tar.gz
Algorithm Hash digest
SHA256 fe8bb42d82a8b7d7641aa1b308655eafb647720dd89624898afcf2d1bce67daa
MD5 f89ffc4c92a34bdad0fdd80bbe056887
BLAKE2b-256 54c5f34168a65c5344f9998e0040ef3f383136a6ea67777107f4f01fa2f78b4d

See more details on using hashes here.

File details

Details for the file camile_ai-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: camile_ai-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 13.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for camile_ai-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d46aa96c34d1a688f2dcd57c8e0618b36d572879a30317f481207583aa7e2273
MD5 73b49469cdb28136c1d2075b286db4c6
BLAKE2b-256 464b2d713618eed1fc663b9eea0f42c5fc597087f946a9e4aedcb7b6c3eef078

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page