Skip to main content

The lightest AI agent framework

Project description

Biopoiesis

The lightest AI application framework. One Python process, one YAML config, one plugin directory.

最轻量级 AI 应用开发框架。一个 Python 进程,一个 YAML 配置,一个插件目录。


Quick Start

1. Install

pip install biopoiesis

2. Configure

Copy config/robots.example.yaml to config/robots.yaml, fill in your API key.

3. Run

biopoiesis

API gateway at http://127.0.0.1:9000.

4. Create your first plugin

biopoiesis --create-plugin hello

restart, then test:

curl -X POST http://127.0.0.1:9000/api/hello -H "Content-Type: application/json" -d '{"content":"Hello"}'
$body = '{"content":"Hello"}'
Invoke-RestMethod -Uri http://127.0.0.1:9000/api/hello -Method POST -ContentType "application/json" -Body $body

5. Examples

# Example Mode Description
1 Translator Simple Direct LLM call
2 Daily Brief Simple LLM with template
3 Counselor Agent Assess → Counsel → Summarize
4 Debate Group Dynamic agents + pointer scheduling
5 Brainstorm Parallel asyncio.gather for parallel LLM
6 Agent Memory Full Stack Standard pipeline + memory + pointer

Full examples guide →

Architecture

Three-tier usage, from simple to complex:

Tier Usage When
Simple system.llm.chat() Translation, summarization
Agent system.create_agent() + pipeline Conversational AI with memory
Group system.create_group() + pointer Multi-agent collaboration

API

Method Path Description
GET /api/health Health check
GET /api/plugins Plugin list
POST /api/invoke Generic plugin call
POST /api/human/create Create data entry

Plugin Development

# plugins/my_plugin.py

async def execute(envelop, cancel_checker):
    llm = cancel_checker.llm if cancel_checker else None
    result = await llm.chat([{"role": "user", "content": envelop.payload.get("content")}])
    envelop.payload = {"result": result}
    return envelop

def on_load(system, app):
    from aiohttp import web
    async def handler(request):
        data = await request.json()
        result = await execute(AICPEnvelop(payload=data), system)
        return web.json_response({"ok": True, "data": result.payload})
    app.router.add_post('/api/my_plugin', handler)

Note: After updating a plugin, restart the framework for changes to take effect.

注意: 更新插件后需重启框架才能生效。

Dependencies

  • Python >= 3.10
  • openai >= 2.0
  • PyYAML >= 6.0
  • aiohttp >= 3.9

License

MIT — see LICENSE 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

biopoiesis-1.0.0.tar.gz (41.7 kB view details)

Uploaded Source

Built Distribution

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

biopoiesis-1.0.0-py3-none-any.whl (55.4 kB view details)

Uploaded Python 3

File details

Details for the file biopoiesis-1.0.0.tar.gz.

File metadata

  • Download URL: biopoiesis-1.0.0.tar.gz
  • Upload date:
  • Size: 41.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.7

File hashes

Hashes for biopoiesis-1.0.0.tar.gz
Algorithm Hash digest
SHA256 c441a7fcca1bd3175463c67522206af917ffae6588a73d7d0c4044b0e88db874
MD5 685ab89886ed0e1e27552f417595dd56
BLAKE2b-256 8b5f291bfdfce6c1e4ac4b379295a8c2db45bf864c26a52f130d6cc64467c1a1

See more details on using hashes here.

File details

Details for the file biopoiesis-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: biopoiesis-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 55.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.7

File hashes

Hashes for biopoiesis-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 55efe346a1d50d99561dffca05791f7227217c361cc1526dfaadaa44048f4380
MD5 649d48ba074db61cc775cb776b8fb46e
BLAKE2b-256 e13e16626199ec37dad18d1883cb5b3831ad26ee08cbbb9d432a8310671ceb20

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