Skip to content

v0.2.0 — Structured extraction, SMS, and async client

Choose a tag to compare

@shanjairaj7 shanjairaj7 released this 01 Mar 05:26
· 19 commits to main since this release

Major capability expansion: per-inbox JSON extraction, SMS support, and a full async client.

New in v0.2.0

Structured extraction (no extra LLM calls)

Define a JSON schema on any inbox and every inbound email is parsed against it automatically — before it reaches your agent. Extract order IDs, urgency levels, issue types, and any field your agent needs:

client.inboxes.update(inbox_id, extraction_schema={
    "type": "object",
    "properties": {
        "issue_type": {"type": "string", "enum": ["billing", "technical", "general"]},
        "urgency": {"type": "string", "enum": ["low", "medium", "high"]},
        "order_id": {"type": "string"},
    }
})
# Every inbound email now has a .extracted field — zero LLM cost

SMS support

Provision a real phone number and send/receive SMS from the same client:

phone = client.phone_numbers.provision()
client.sms.send(to="+14155551234", body="Your order shipped", phone_number_id=phone.id)

Async client

Full async support with AsyncCommuneClient — drop-in replacement for async frameworks:

from commune import AsyncCommuneClient

async with AsyncCommuneClient(api_key="comm_...") as client:
    inbox = await client.inboxes.create(local_part="support")

Use cases unlocked

  • Support ticket routing: extract issue_type from inbound email, route to correct agent without an LLM classification call
  • SMS escalation: email for async, SMS for urgent — both from the same agent
  • Order processing: extract order details from confirmation emails automatically