Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,15 @@ NEO4J_PASSWORD=changeme_neo4j
REDIS_HOST=redis
REDIS_PORT=6379
REDIS_URL=redis://redis:6379/0
REDIS_OPERATION_TIMEOUT_SECONDS=10
AGENT_JOB_STREAM=agents:jobs
AGENT_JOB_GROUP=agents-workers
AGENT_WORKER_RECLAIM_IDLE_SECONDS=60
AGENT_WORKER_EXECUTION_TIMEOUT_SECONDS=300
AGENT_WORKER_LOCK_TTL_SECONDS=390
AGENT_MAX_RETRIES=3
# Required in production; use a generated Fernet-compatible key.
EXECUTION_PAYLOAD_KEY=

# ── OpenSearch ───────────────────────────────────────────────────────────
OPENSEARCH_URL=http://opensearch:9200
Expand Down
18 changes: 15 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ jobs:
with: { version: "${{ env.PNPM_VERSION }}" }
- uses: actions/setup-node@v4
with: { node-version: 20, cache: pnpm }
- uses: actions/setup-python@v5
with: { python-version: "${{ env.PYTHON_VERSION }}" }
- run: python -m pip install ruff mypy
- run: pnpm install --frozen-lockfile
- run: pnpm lint
- run: pnpm typecheck
Expand Down Expand Up @@ -57,9 +60,10 @@ jobs:
- working-directory: ${{ matrix.service }}
run: |
pip install -r requirements.txt
pip install ruff pytest
ruff check app || true
pytest -q || true
pip install ruff mypy
ruff check app tests
mypy app --ignore-missing-imports
pytest -q

docker-build:
name: Docker — build all images
Expand All @@ -78,12 +82,20 @@ jobs:
docker build -f "$dockerfile" -t "ai-rxos/$tag:ci" .
echo "::endgroup::"
done
- name: Verify agents image
run: |
image=ai-rxos/services-agents:ci
docker run --rm "$image" python -m pip check
docker run --rm "$image" python -c "import fastapi, langgraph, cryptography, redis, jwt, opentelemetry, opentelemetry.sdk, opentelemetry.exporter.otlp.proto.http"
docker run --rm "$image" python -m compileall -q app tests
docker run --rm "$image" python -m pytest -q

helm-lint:
name: Helm — lint chart
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: azure/setup-helm@v4
- run: helm dependency build infra/helm/ai-rxos
- run: helm lint infra/helm/ai-rxos
- run: helm template ai-rxos infra/helm/ai-rxos -f infra/helm/ai-rxos/values-dev.yaml > /dev/null
12 changes: 11 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.PHONY: bootstrap dev build lint test up down logs helm-lint helm-template
.PHONY: bootstrap dev build lint test test-python up down logs helm-lint helm-template

bootstrap:
pnpm install
Expand All @@ -16,6 +16,16 @@ lint:
test:
pnpm test

test-python:
cd apps/ai-services && python -m pytest -q
cd apps/knowledge-service && python -m pytest -q
cd services/agents && python -m pytest -q
cd services/docking && python -m pytest -q
cd services/kg && python -m pytest -q
cd services/literature && python -m pytest -q
cd services/reports && python -m pytest -q
cd services/workflows && python -m pytest -q

up:
docker compose up --build -d

Expand Down
36 changes: 36 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,42 @@ out to the native toolchain (`go build`, `uvicorn`, `pytest`, ...), so Turbo
can orchestrate the whole polyglot repo (`pnpm build`, `pnpm dev --parallel`,
etc.) rather than just the JS packages.

## Testing

Run the full workspace test command through Turbo:

```bash
pnpm test
```

Do not run `python -m pytest` from the repository root. The Python services
are independent projects with separate `app` packages, dependency sets, and
test configuration. A single root pytest process mixes those import roots and
causes errors such as `ModuleNotFoundError: No module named 'app'`, missing
service-specific dependencies, and duplicate `test_health` module names.

To run Python tests together from a shell that supports Make:

```bash
make test-python
```

Or run a service directly from its own directory, for example:

```bash
cd services/agents
python -m pytest -q
```

The `bezs-pipeline` tests are a separate Python project. Install its project
and development dependencies from `bezs-pipeline` before running them:

```bash
cd bezs-pipeline
python -m pip install -e ".[dev]"
python -m pytest -q
```

## Quickstart — Docker Compose (fastest path to a running system)

```bash
Expand Down
22 changes: 22 additions & 0 deletions architecture/06-ai-agent-orchestration.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,27 @@
# AI Agent Orchestration Architecture - AI-RxOS

> **Implementation note (Prompt 9):** The current implementation is in
> `services/agents`. It uses a custom `StateGraph`/`AgentGraph` runtime and an
> MCP client; it does not install the external LangGraph package, OpenAI
> Agents SDK, or expose the illustrative MCP server shown later in this
> document. The code-backed behavior takes precedence over the conceptual
> examples below.

The current Prompt 9 service also uses Redis Streams for durable asynchronous
jobs, consumer-group recovery, tenant-scoped idempotency keys, bounded worker
retries, and opaque request/correlation IDs. `AuthorizationService` applies
deny-by-default agent and tool policies from authenticated JWT context. The
repository does not currently expose a separate Better Auth permission API or
OpenTelemetry exporter for this service.

> **Implementation note (Prompt 9):** The current implementation is in
> `services/agents`. It uses a custom `StateGraph`/`AgentGraph` runtime and an
> MCP client; it does not install the external LangGraph package, OpenAI
> Agents SDK, or expose the illustrative MCP server shown later in this
> document. The code-backed behavior takes precedence over the conceptual
> examples below.
# AI Agent Orchestration Architecture - AI-RxOS

## Overview
AI-RxOS uses a multi-agent orchestration system based on the Model Context Protocol (MCP) and OpenAI Agents SDK. Agents are autonomous AI entities that use tools to accomplish tasks, coordinate with other agents, and maintain conversation context.

Expand Down
1 change: 1 addition & 0 deletions bezs-pipeline
Submodule bezs-pipeline added at c64287
Loading
Loading