semos-agentura-core
Shared MCP + A2A framework every Semos Agentura agent builds on. An agent is a BaseAgentService
subclass plus a list of tools; this package turns that into a FastAPI service speaking both protocols.
Install
pip install semos-agentura-core
Minimal agent
from semos.agentura.core import (
AgentTool,
BaseAgentService,
SkillDef,
agent_tool,
create_app,
)
@agent_tool(read_only=True)
async def my_tool(param: str) -> str:
"""Does something useful with param."""
return f"Result: {param}"
class MyAgentService(BaseAgentService):
@property
def agent_name(self) -> str:
return "My Agent"
@property
def agent_description(self) -> str:
return "Does something useful."
def get_tools(self) -> list[AgentTool]:
return [my_tool]
def get_skills(self) -> list[SkillDef]:
return [SkillDef(id="my-skill", name="My Skill", description="...")]
async def execute_skill(self, skill_id, message, *, task_id=None) -> str:
return "result"
app = create_app(MyAgentService())
Serve it with uvicorn module:app. create_app mounts MCP at /mcp/sse and A2A at /a2a (REST)
and /a2a/rpc (JSON-RPC), and serves the agent card at /.well-known/agent-card.json.
What it provides
| Area | Contents |
|---|---|
| Service base | BaseAgentService - declares tools and skills, resolves file inputs |
| Tools | AgentTool (LangChain BaseTool subclass), the @agent_tool decorator, ToolResult, NamedFile, FileAttachment |
| Transport | create_app - FastAPI app serving MCP and A2A from one service |
| Agentic loop | LLMExecutor - multi-step tool calling with 5 synthetic tools mapping to A2A task states |
| Clients | AgenturaClient (headless, MCP + A2A), MCPHub, AgentConnection |
| File middleware | FileRegistry and symmetric pre/post processing, so the LLM only sees symbolic filenames |
| Settings | CommonSettings - loads agent .env, falling back to the workspace root |
Tool input schemas are the raw MCP inputSchema (LangChain 1.0 accepts raw dicts) and are validated
with jsonschema, so oneOf/anyOf/const/enum are enforced as published.
Documentation
License
Apache-2.0
Metadata
Release files for semos-agentura-core 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| semos_agentura_core-1.0.1.tar.gz | 52.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| semos_agentura_core-1.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 98.6 kB
Release files / semos_agentura_core-1.0.1.tar.gz
| Download URL | semos_agentura_core-1.0.1.tar.gz |
|---|---|
| Size | 52.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d95bfd7ffa6d9a58bb50c0f90e5a8f619d212a3f6c570fbdf3389b9c130c6e93
|
|
BLAKE2b-256 checksum How to use checksums |
5241a5eae2d98c016836d2963275bcbe94dfad20e2ee9990d725a17f35ff1ab3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.15 {"installer":{"name":"uv","version":"0.12.15","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / semos_agentura_core-1.0.1-py3-none-any.whl
| Download URL | semos_agentura_core-1.0.1-py3-none-any.whl |
|---|---|
| Size | 45.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6957e61b75bbb5e7c6a891235056714995a3721f75b53421aedd5277504f6d50
|
|
BLAKE2b-256 checksum How to use checksums |
f931b99a5a30cd509e57cc73785757d8b7e42a31dae44946cb8a53785b2c31fe
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.15 {"installer":{"name":"uv","version":"0.12.15","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|