Skip to main content

Circle Flake Python SDK

Capture agent execution from LangChain, LangGraph, and Deep Agents using one framework-independent trace/span model.

Install

pip install -e ".[langchain,dev]"

Install .[langgraph] or .[deepagents] when using those frameworks.

LangChain

Run the included deterministic sample (no provider API key required):

python examples/langchain_agent.py
from circleflake import CircleFlake

cf = CircleFlake(agent_name="gtm-agent")

# Pass the handler to a chain/model invoke call.
result = chain.invoke(
    {"input": "Qualify Acme"},
    config={"callbacks": [cf.langchain_handler]},
)

# Export captured traces as JSON.
print(cf.exporter.exported)

# Optional: POST completed traces to your Circle Flake ingestion endpoint.
# cf = CircleFlake(agent_name="gtm-agent",
#                  endpoint="https://api.example.com/v1/traces",
#                  api_key="...")
cf.flush()

LangGraph

LangGraph accepts LangChain callback handlers through RunnableConfig:

result = graph.invoke(
    {"messages": [...]},
    config={"callbacks": [cf.langgraph_handler]},
)

The LangGraph adapter uses the callback lifecycle and records graph/node metadata when supplied by the runtime.

Deep Agents

Deep Agents are built on the LangGraph/LangChain runtime. Start by passing the Deep Agents adapter in the same callbacks config:

result = agent.invoke(
    {"messages": [...]},
    config={"callbacks": [cf.deepagents_handler]},
)

This captures framework callback activity. Deep-Agent-specific planning and delegation semantics are not yet normalized into dedicated span types; those will be added against the exact Deep Agents version used by your application.

Data handling

Inputs and outputs are not captured by default. Set capture_content=True only if you have reviewed the privacy implications for your prompts, tool arguments, and outputs.

Metadata

Release files for circleflake 0.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for circleflake 0.1.3
File Size Uploaded Provenance Actions
circleflake-0.1.3.tar.gz 8.1 kB Without provenance Details for circleflake-0.1.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for circleflake 0.1.3
File Interpreter ABI Platform Actions
circleflake-0.1.3-py3-none-any.whl Python 3 none any Details for circleflake-0.1.3-py3-none-any.whl

Total release size: 21.5 kB

Release files / circleflake-0.1.3.tar.gz

Download URL circleflake-0.1.3.tar.gz
Size 8.1 kB
Tags Source
SHA-256 checksum
How to use checksums
648b7fa8c8c2dd459a85c529b15efa63f645cb314f22f64a6480a9d1826bfb85
BLAKE2b-256 checksum
How to use checksums
db205204d5c46f52e4dd8cda68a551302dba5837fce2c97e5eb35d1ed4982ea6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

Release files / circleflake-0.1.3-py3-none-any.whl

Download URL circleflake-0.1.3-py3-none-any.whl
Size 13.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7193b221a40b4bc10de6e0b547d061570a928dcdafeeed7f1248ec2511b36c3a
BLAKE2b-256 checksum
How to use checksums
2d792e612593c8a2a5d32d4a32b0fc127553e4ea186155aaf744317276a08ea1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

Security for circleflake 0.1.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.3 This release

2 release files No provenance

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