ClientCoded SDK - AI agent testing, tracing, and root cause analysis. Built on OpenInference.
pip install clientcoded==0.5.0 Copy PIP instructions
Trace your AI agent's tool calls for root cause analysis when failures occur.
pip install clientcoded Quick Start import clientcoded # Configure once at startup clientcoded.configure( agent_id="your-agent-id", api_key="your-api-key" ) # Decorate any function your agent calls @clientcoded.trace def get_invoice(invoice_id): return stripe.Invoice.retrieve(invoice_id) @clientcoded.trace def search_knowledge_base(query): return pinecone.query(query) @clientcoded.trace def update_crm(contact_id, data): return hubspot.update_contact(contact_id, data) Conversation Tracking # At the start of each conversation clientcoded.set_conversation_id("conv-123") # At each turn clientcoded.set_turn(1) response = agent.handle_message("What is my invoice total?") clientcoded.set_turn(2) response = agent.handle_message("Can you break that down by line item?") Async Support @clientcoded.trace_async async def get_invoice(invoice_id): return await stripe.Invoice.aretrieve(invoice_id) Custom Names @clientcoded.trace(name="stripe_invoice_lookup") def get_invoice(invoice_id): return stripe.Invoice.retrieve(invoice_id) Manual Logging For complex operations where decorators don't fit:
import time start = time.time() try: result = complex_multi_step_operation() clientcoded.log_trace( "complex_operation", input_data={"step": "final"}, output_data=result, latency_ms=int((time.time() - start) * 1000) ) except Exception as e: clientcoded.log_trace( "complex_operation", input_data={"step": "final"}, error=str(e), latency_ms=int((time.time() - start) * 1000) ) raise LangChain Integration from langchain.tools import tool import clientcoded clientcoded.configure(agent_id="your-agent-id", api_key="your-api-key") @tool @clientcoded.trace def search_database(query: str) -> str: """Search the company database.""" return db.execute(query) LlamaIndex Integration from llama_index.core.tools import FunctionTool import clientcoded clientcoded.configure(agent_id="your-agent-id", api_key="your-api-key") @clientcoded.trace def query_index(question: str) -> str: return index.query(question) tool = FunctionTool.from_defaults(fn=query_index) What Gets Traced For each decorated function call, the SDK logs:
langchain openai anthropic llama-index crewai dspy bedrock all
ai agent testing qa tracing evaluation openinference opentelemetry langchain openai anthropic
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
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.
None of the files in this release were uploaded with provenance metadata.
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.




