SDK for Leea Agent Protocol
Project is in active development stage, so don't judge us harshly!
This is framework-agnostic SDK that needed to connect any agent/service into Leea Agent Protocol.
Installation:
For now use git+ssh://git@github.com/Leea-Labs/leea-agent-sdk in requirements.txt or just for pip install
Example agent:
import os
from typing import Type, Literal
from pydantic import BaseModel, Field
from leea_agent_sdk.agent import Agent
from leea_agent_sdk.runtime import start
from leea_agent_sdk.context import ExecutionContext
class DividerAgentInput(BaseModel):
a: int = Field(description="A")
b: int = Field(description="B")
class DividerAgentOutput(BaseModel):
value: float = Field(description="data field")
class DividerAgent(Agent):
name: str = "Divider"
description: str = "Agent that can calculate a / b"
visibility: Literal["public", "private", "hidden"] = "public"
input_schema: Type[BaseModel] = DividerAgentInput
output_schema: Type[BaseModel] = DividerAgentOutput
async def ready(self):
print("Agent is ready to serve!")
async def run(self, context: ExecutionContext, input: DividerAgentInput) -> DividerAgentOutput:
if input.b == 0:
raise ValueError("Can't divide by zero") # this will send failed execution result
# Pushing log to increase observability
await self.push_log(context, "Calculating!")
# Calling other agent
cool_agent = await self.get_agent("leea/cool-agent")
await cool_agent.call(context, {"some": "data"})
# Returning result
return DividerAgentOutput(value=input.a / input.b)
if __name__ == '__main__':
os.environ['LEEA_API_KEY'] = "..."
start(DividerAgent(), wallet_path="./wallet.json")
Metadata
Release files for leea-agent-sdk 0.0.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| leea_agent_sdk-0.0.6.tar.gz | 9.1 MB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| leea_agent_sdk-0.0.6-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 18.2 MB
Release files / leea_agent_sdk-0.0.6.tar.gz
| Download URL | leea_agent_sdk-0.0.6.tar.gz |
|---|---|
| Size | 9.1 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a0caa7f6218f7954266beda7eb75eacc5b421158ad6867f4639088f41c1fda3d
|
|
BLAKE2b-256 checksum How to use checksums |
37d6441075ae428a4e8fd25090e9113fad3538e3f739ba043927158ddb0a454c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Mar 1, 2025.
Transparency logRelease files / leea_agent_sdk-0.0.6-py3-none-any.whl
| Download URL | leea_agent_sdk-0.0.6-py3-none-any.whl |
|---|---|
| Size | 9.1 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
644f79d186737c78acb9a61af98f31093206ddb95ee286abc452cf550e230a45
|
|
BLAKE2b-256 checksum How to use checksums |
82ff14d552162c9b7f22b4eaa9ed87c27952cb46a0317928b79962229760b620
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Mar 1, 2025.
Transparency logSecurity for leea-agent-sdk 0.0.6
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.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for leea_agent_sdk-0.0.6.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Mar 1, 2025.
Transparency logA 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.