Infrastructure for building and deploying AI agents
Project description
Definable
Infrastructure for building and deploying AI agents with a simple YAML configuration and base class extension pattern.
Features
- Simple Base Class: Extend
AgentBoxto create your agent - YAML Configuration: Configure builds with declarative YAML files
- Docker Packaging: Build Docker images with a single command
- FastAPI Integration: Automatic REST API generation
- CLI Tools: Build and serve commands for development
Quick Start
1. Install Definable
pip install definable
2. Create Your Agent
# main.py
from definable import AgentBox, AgentInput, AgentOutput, AgentInfo
from pydantic import Field
class SampleAgentInput(AgentInput):
message: str = Field(description="Input message to process")
class SampleAgentOutput(AgentOutput):
response_message: str = Field(description="Processed response message")
class DemoAgent(AgentBox):
def setup(self):
self.name = 'demo-agent'
self.version = '1.0.0'
print("Demo agent initialized!")
def invoke(self, agent_input: SampleAgentInput) -> SampleAgentOutput:
processed_message = f"Processed: {agent_input.message.upper()}"
return SampleAgentOutput(response_message=processed_message)
def info(self) -> AgentInfo:
return AgentInfo(
name=self.name,
description="A simple demo agent that processes messages",
version=self.version,
input_schema=SampleAgentInput.model_json_schema(),
output_schema=SampleAgentOutput.model_json_schema()
)
3. Create Configuration
# agent.yaml
build:
python_version: "3.11"
dependencies:
- "requests>=2.28.0"
system_packages:
- "curl"
environment_variables:
- API_KEY
agent: "main.py:DemoAgent"
platform:
name: "demo-agent"
description: "A simple demo agent for testing"
version: "1.0.0"
concurrency:
max_concurrent_requests: 50
request_timeout: 300
4. Build and Serve
# Build Docker image
definable build -t my-agent
# Serve locally for development
definable serve -p 8000
Documentation
Visit our documentation for detailed guides and API reference.
License
MIT License - see LICENSE file for details.
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
definable-0.1.1.tar.gz
(9.4 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
definable-0.1.1-py3-none-any.whl
(11.7 kB
view details)
File details
Details for the file definable-0.1.1.tar.gz.
File metadata
- Download URL: definable-0.1.1.tar.gz
- Upload date:
- Size: 9.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fe083cc87fa4dac115d956a1dd0fa4ab900d6c02e2b08d34c0bf4cbc8db9e305
|
|
| MD5 |
87dc6ab5b749d3c0170f0c6e82d9662d
|
|
| BLAKE2b-256 |
b89f0380884191fea6f4ac2d30843d21417467c302bd3384740438742d579a4a
|
File details
Details for the file definable-0.1.1-py3-none-any.whl.
File metadata
- Download URL: definable-0.1.1-py3-none-any.whl
- Upload date:
- Size: 11.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c14f85362b2c5eb698cd09c17b9b7e28885baf5c8ce4651b0d1dfb813eadc656
|
|
| MD5 |
7d84623ab0903eae9501b8f446ede39a
|
|
| BLAKE2b-256 |
d1b7101a6e81b3221f311207664c7051588a064ae2d3ff3823a9eceaca933acc
|