Skip to main content

cogext SDK

Track commitments made by your AI agents — automatically.

Install

pip install cogext

30-second quickstart

from cogext import track, CogextClient
import os

class MyAgent:
    def run(self, prompt: str) -> str:
        return "I will send the report by Tuesday EOD"

agent = MyAgent()
tracked = track(
    agent,
    api_key=os.environ["COGEXT_API_KEY"],
    user_id=os.environ["COGEXT_USER_ID"],
    agent_id="my-agent-001",
    base_url="http://localhost:8000/api/v1",
)

# Any output from .run() that contains a commitment is automatically tracked
result = tracked.run("Summarise our meeting")
print(result)  # agent output, unmodified

# Fetch open commitments
import asyncio
client = CogextClient(
    api_key=os.environ["COGEXT_API_KEY"],
    user_id=os.environ["COGEXT_USER_ID"],
)
commitments = asyncio.run(client.get_commitments())
print(commitments)

Environment variables

Variable Description
COGEXT_API_KEY Your API key (any non-empty string in v1)
COGEXT_USER_ID UUID that identifies the end user
COGEXT_BASE_URL Override the backend URL (default: http://localhost:8000/api/v1)

Supported agent methods

track() intercepts: .run(), .invoke(), .chat(), .complete(), and __call__. Works with sync and async methods. Never raises — errors are logged as warnings.


More at cogextai.com

Download files

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

Source Distribution

cogext-0.2.0.tar.gz (5.7 kB view details)

Uploaded Source

Built Distribution

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

cogext-0.2.0-py3-none-any.whl (6.7 kB view details)

Uploaded Python 3

File details

Details for the file cogext-0.2.0.tar.gz.

File metadata

  • Download URL: cogext-0.2.0.tar.gz
  • Upload date:
  • Size: 5.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.14.7

File hashes

Hashes for cogext-0.2.0.tar.gz
Algorithm Hash digest
SHA256 d5fcf8a569607401de1f0d4069cea4e7c636ee7c80529313017bc0830c9a14d9
MD5 0b0d00eb82abf05497e0338e4a738227
BLAKE2b-256 0f3fb445310af4bc7925e1a18c5a8e2098a3762a4b960f89a9509a103fe247f0

See more details on using hashes here.

File details

Details for the file cogext-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: cogext-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 6.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.14.7

File hashes

Hashes for cogext-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 030c0bf4fc3c0f226fb2ced1c9a53d53022072b7d62dff9d07143a0886621130
MD5 179366410b90e99c947fe547f66431b6
BLAKE2b-256 710460ec4b2d5b4881cda557526b80d2baa0c1b6e54b2ceac45e746c88d4daea

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page