AgentScope Python SDK
Project description
AgentScope Python SDK
Python SDK for AgentScope telemetry, tracing, and instrumentation.
Install
pip install agentscope-sdk
Quick Start
from agentscope import observe_run, observe_span, trace
with observe_run("coding_agent", agent_name="demo"):
with observe_span("llm_call", provider="openai", model="gpt-4o"):
trace.log("sending prompt", level="info")
Set AGENTSCOPE_API_BASE=http://localhost:8080 and AGENTSCOPE_API_KEY=... as needed.
Auto Instrumentation
from agentscope import auto_instrument
auto_instrument(["openai", "anthropic"])
This enables automatic tracing hooks for supported providers.
Coding-Agent Helpers
from agentscope import coding_agent_run, read_file, run_command, write_file
with coding_agent_run(agent_name="codebot"):
content = read_file("README.md")
write_file("notes.txt", content)
result = run_command("echo done")
API
observe_run(...)observe_span(...)trace.auto(providers=None)trace.log(message, level="info", span_id=None, metadata=None, timestamp=None)trace.update_span(span_id, data)auto_trace(providers=None)auto_instrument(providers=None)coding_agent_run(agent_name="coding_agent")instrument_coding_agent(fn)read_file(path, encoding="utf-8")write_file(path, content, encoding="utf-8")run_command(command, cwd=None, env=None, check=False, shell=None)
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
agentscope_sdk-0.1.8.tar.gz
(16.8 kB
view details)
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 agentscope_sdk-0.1.8.tar.gz.
File metadata
- Download URL: agentscope_sdk-0.1.8.tar.gz
- Upload date:
- Size: 16.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cb943fefaa195de82faebfd69f9fc8b688719227e0560e7aeb90de8a59dd6a49
|
|
| MD5 |
2b7774fc2b2afe36ff4bfca642434130
|
|
| BLAKE2b-256 |
27ef40c3321273adb2009c01fe36bbd226685763c95a3281fa74c92b33abe8f3
|
File details
Details for the file agentscope_sdk-0.1.8-py3-none-any.whl.
File metadata
- Download URL: agentscope_sdk-0.1.8-py3-none-any.whl
- Upload date:
- Size: 24.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dbe082d5cb6efc538b58f15beb133e0deabaa36f607c8f3bfb1e2c0e356e6e06
|
|
| MD5 |
6220e93674a4f56dac878b0f8b35a119
|
|
| BLAKE2b-256 |
403b9ebbf70de1eedaa787c366fdcc4449e0f1396efb78e5ffb2435673536fb8
|