Skip to main content

Server SDK for building AgentVault A2A compliant agents.

Project description

AgentVault Server SDK

This package provides base classes, utilities, and tools to help developers build Agent-to-Agent (A2A) protocol compliant agents within the AgentVault ecosystem.

Overview

The core component is the BaseA2AAgent abstract class, which defines the interface agent implementations must adhere to. The SDK also provides FastAPI integration helpers (create_a2a_router) to easily expose an agent implementation as a standard A2A JSON-RPC endpoint.

Packager Utility (agentvault-sdk package)

To simplify deployment, the SDK includes a command-line utility to generate standardized Docker packaging artifacts for your agent project.

Purpose: Creates a Dockerfile, a .dockerignore file, and copies necessary configuration files (like requirements.txt and agent-card.json) into an output directory, ready for building a container image.

Usage:

agentvault-sdk package [OPTIONS]

Options:

  • --output-dir DIRECTORY / -o DIRECTORY: (Required) Directory to write Dockerfile and other artifacts.
  • --entrypoint TEXT: (Required) Python import path to the FastAPI app instance (e.g., my_agent.main:app).
  • --python TEXT: Python version for the base image tag (e.g., 3.10, 3.11). [default: 3.11]
  • --suffix TEXT: Suffix for the python base image (e.g., slim-bookworm, alpine). [default: slim-bookworm]
  • --port INTEGER: Port the application will listen on inside the container. [default: 8000]
  • --requirements PATH / -r PATH: Path to the requirements.txt file. If not provided, it looks for ./requirements.txt in the current directory and copies it if found. A warning is issued if the SDK dependency seems missing.
  • --agent-card PATH / -c PATH: Path to the agent-card.json file. If provided, it will be copied into the output directory.
  • --app-dir TEXT: Directory inside the container where the application code will reside. [default: /app]
  • --help: Show this message and exit.

Example:

# Assuming your agent code is in ./src and FastAPI app is in src/my_agent/main.py
# and you have ./requirements.txt and ./agent-card.json

agentvault-sdk package \
    --output-dir ./agent_build \
    --entrypoint my_agent.main:app \
    --agent-card ./agent-card.json \
    --python 3.11

Generated Files:

Running the command creates the specified output directory (e.g., ./agent_build) containing:

  • Dockerfile: A multi-stage Dockerfile optimized for Python applications.
  • .dockerignore: A standard file listing patterns to exclude from the build context.
  • requirements.txt (if source found/provided): A copy of your requirements file.
  • agent-card.json (if --agent-card provided): A copy of your agent card file.

Building and Running the Image:

After generating the files, navigate to your project root (where your agent source code and the output directory are) and run:

# Build the image (replace 'my-agent-image:latest' with your desired tag)
docker build -t my-agent-image:latest -f ./agent_build/Dockerfile .

# Run the container
docker run -d -p 8000:8000 --name my-running-agent my-agent-image:latest

(Adjust the -p flag if you used a different port)

Future Directions

  • Integration with specific deployment platforms.
  • More sophisticated dependency analysis.
  • Advanced configuration options for Dockerfile generation.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

agentvault_server_sdk-0.1.0.tar.gz (19.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

agentvault_server_sdk-0.1.0-py3-none-any.whl (22.9 kB view details)

Uploaded Python 3

File details

Details for the file agentvault_server_sdk-0.1.0.tar.gz.

File metadata

  • Download URL: agentvault_server_sdk-0.1.0.tar.gz
  • Upload date:
  • Size: 19.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.2 CPython/3.11.0 Windows/10

File hashes

Hashes for agentvault_server_sdk-0.1.0.tar.gz
Algorithm Hash digest
SHA256 4a699c0cfbe83fe48d720b2b7d94324fc688791b1d6d9280d151629887f481f3
MD5 2dfd4a5884230b733f9195506723761a
BLAKE2b-256 c88f9f302dc83961c41cc1d52013d418a2c945e79ba22cdf1d743cab5051008b

See more details on using hashes here.

File details

Details for the file agentvault_server_sdk-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for agentvault_server_sdk-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1a8b49f8e9a8ac9d529bd85c0b23309dc20dc6508da04ba00df3a53fc87d84da
MD5 2bf9f1207bb9346b9a2733b46809a6d6
BLAKE2b-256 07015b7b733bd2740c31dc19d1b9b5d7ec0a2e783dee3a93c09c46416e031544

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page