Skip to main content

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 AgentBox to 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


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.3.tar.gz (9.7 kB view details)

Uploaded Source

Built Distribution

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

definable-0.1.3-py3-none-any.whl (12.0 kB view details)

Uploaded Python 3

File details

Details for the file definable-0.1.3.tar.gz.

File metadata

  • Download URL: definable-0.1.3.tar.gz
  • Upload date:
  • Size: 9.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.6

File hashes

Hashes for definable-0.1.3.tar.gz
Algorithm Hash digest
SHA256 f85496e03a7ae3b219eb6c38792dbe2107675252217c9be671f94beb41ddec84
MD5 c7ea12a8d72b1693cf409af83e4ded38
BLAKE2b-256 2a6cb4e1da7ff297cb6dc5fba1cffa98ca9f5482a5b004c0259f84dcdf79733b

See more details on using hashes here.

File details

Details for the file definable-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: definable-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 12.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.6

File hashes

Hashes for definable-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 67bb9bb7fc55822a9ac6c943eb7fb1874a13bb3dfef55bff30aeba2d08e56253
MD5 05d78b3bd5f0e282ad77083b82edbcb8
BLAKE2b-256 7e9b046da7769eb553f803b24a24b79c9a5ace41ef55a696ffbb6c7850a04e4f

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