Python SDK for portable AI agent evaluations with outputs, tool calls, and audit context.
Project description
ECP Python SDK
Python SDK for building agents that comply with the Evaluation Context Protocol (ECP).
ECP is a vendor-neutral protocol for testing agent outputs, tool calls, and evaluator-visible audit context across frameworks, models, eval platforms, and CI systems.
Install
pip install "ecp-sdk==0.3.1"
Framework extras:
pip install "ecp-sdk[langchain]==0.3.1"
pip install "ecp-sdk[crewai]==0.3.1"
pip install "ecp-sdk[llamaindex]==0.3.1"
pip install "ecp-sdk[pydanticai]==0.3.1"
Usage
from ecp import Result, agent, on_step, serve
@agent(name="MyAgent")
class MyAgent:
@on_step
def step(self, user_input: str):
return Result(
public_output=f"Echo: {user_input}",
evaluation_context="Echoed the input for evaluation.",
tool_calls=[{"name": "echo", "arguments": {"text": user_input}}],
)
if __name__ == "__main__":
serve(MyAgent())
evaluation_context is the preferred field for evaluator-safe audit evidence. private_thought is still accepted as a deprecated compatibility alias.
Streamable HTTP
Agents can also run as an ECP Streamable HTTP server:
if __name__ == "__main__":
ecp.serve_http(MyAgent(), host="127.0.0.1", port=8765, path="/ecp")
The endpoint accepts JSON-RPC POST requests at /ecp. It returns JSON for requests, 202 Accepted for notifications, and 405 Method Not Allowed for GET SSE streams until ECP defines server-initiated messages.
Links
- Documentation: https://evaluationcontextprotocol.io/
- Repository: https://github.com/evaluation-context-protocol/ecp
- Issues: https://github.com/evaluation-context-protocol/ecp/issues
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ecp_sdk-0.3.3.tar.gz.
File metadata
- Download URL: ecp_sdk-0.3.3.tar.gz
- Upload date:
- Size: 13.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4d0d6e2324cbcacaf1396be2a24b8a47bf3b5f828a75f01ad6994a8063832eed
|
|
| MD5 |
0d56ccf7274749aee6d11791953ccc1f
|
|
| BLAKE2b-256 |
ed9687a62a639818e47e549f3e4ad082cf75f1149a504710aeb6a581f127af2f
|
Provenance
The following attestation bundles were made for ecp_sdk-0.3.3.tar.gz:
Publisher:
release.yml on evaluation-context-protocol/ecp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ecp_sdk-0.3.3.tar.gz -
Subject digest:
4d0d6e2324cbcacaf1396be2a24b8a47bf3b5f828a75f01ad6994a8063832eed - Sigstore transparency entry: 1904581508
- Sigstore integration time:
-
Permalink:
evaluation-context-protocol/ecp@7053195b37cefc701dc1c1a5562854668f1e5e53 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/evaluation-context-protocol
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@7053195b37cefc701dc1c1a5562854668f1e5e53 -
Trigger Event:
pull_request
-
Statement type:
File details
Details for the file ecp_sdk-0.3.3-py3-none-any.whl.
File metadata
- Download URL: ecp_sdk-0.3.3-py3-none-any.whl
- Upload date:
- Size: 14.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fd3e179793fb9f56c04f4122ef475a0fdbbb13cee96e1a37fa25240166814298
|
|
| MD5 |
07112070151455cba462847c5ac2c113
|
|
| BLAKE2b-256 |
2ba86713e69423bf2110e2da795d38ff6d901d9d186cfa3ce099f473b4cdbecb
|
Provenance
The following attestation bundles were made for ecp_sdk-0.3.3-py3-none-any.whl:
Publisher:
release.yml on evaluation-context-protocol/ecp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ecp_sdk-0.3.3-py3-none-any.whl -
Subject digest:
fd3e179793fb9f56c04f4122ef475a0fdbbb13cee96e1a37fa25240166814298 - Sigstore transparency entry: 1904581620
- Sigstore integration time:
-
Permalink:
evaluation-context-protocol/ecp@7053195b37cefc701dc1c1a5562854668f1e5e53 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/evaluation-context-protocol
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@7053195b37cefc701dc1c1a5562854668f1e5e53 -
Trigger Event:
pull_request
-
Statement type: