connect-flow is a Symfony 8 application exploring a connector-oriented execution model centered on:
LambdaExpressionas the domain languageLambdaCapabilityas the execution-facing capabilityLanguageCapabilityas a local LLM overlay (text -> lambda)darkwood/flowas the runtime- Composio as one backend for primitive/tool execution
This repository is currently a pragmatic MVP / phase-2 prototype. It is intentionally small and focused on a single vertical slice.
The current runtime path is:
natural language -> LanguageCapability -> LambdaExpression -> LambdaFlowRuntime -> Flow -> Composio primitives
Key points:
- Lambda expressions are first-class domain objects.
- Flow executes the expression through
Flow\Job\LambdaJob. darkwood/naviis kept in the runtime shell, not as the center of the domain.- Composio is an infrastructure adapter behind
PrimitiveInvokerInterface. - Ollama + Mistral are used locally for GDPR-friendly text-to-lambda generation.
- PHP
>= 8.5 - Composer
- Ollama running locally for
LanguageCapability - A Composio API key if you want to execute real primitives
composer install
cp .env .env.localThen adjust the environment in .env.local.
COMPOSIO_API_KEY=
COMPOSIO_BASE_URL=https://backend.composio.dev/api
COMPOSIO_PRIMITIVES=send_email
COMPOSIO_PRIMITIVE_MAP={}
COMPOSIO_USER_ID=
OLLAMA_BASE_URL=http://127.0.0.1:11434
OLLAMA_MODEL=ministral-3:8bNotes:
COMPOSIO_PRIMITIVESlists the primitives injected into lambda evaluation as leading curried arguments.COMPOSIO_PRIMITIVE_MAPmaps primitive names to Composio tool slugs.- For handwritten or model-generated lambda expressions, prefer alphanumeric identifiers such as
sendemailorfetchemails. - The runtime normalizes configured primitive names before handing the expression to
Flow\Job\LambdaJob.
The runtime uses Flow\Job\LambdaJob, which accepts a small lambda syntax:
- Unicode
λfor abstraction - alphanumeric identifiers only
.,(,), and spaces- application by adjacency or grouping
Good examples:
λx.x
λsendemail.λpayload.sendemail(payload)
λfetchdata.λquery.fetchdata(query)
Avoid:
- underscores or hyphens in identifiers inside the lambda source
- JSON, arrays, object literals, or markdown
- inline literals such as
(λx.x)(5)for generated expressions
Translate natural language to lambda:
php bin/console connect-flow:language:to-lambda "fetch my latest emails"Run a lambda expression through Flow:
php bin/console connect-flow:lambda:run 'λx.x' --args='[5]'Run a primitive-backed expression:
php bin/console connect-flow:lambda:run 'λsendemail.λpayload.sendemail(payload)' \
--args='[{"to":"team@example.com","subject":"Hello"}]' \
--user='your-composio-user-id'The repository includes small runnable examples:
php examples/simple_lambda.php
php examples/lambda_tool.php
php examples/text_to_lambda.phpThey are useful to understand the shape of the runtime without booting the whole Symfony app.
Run the test suite with:
php bin/phpunitOr via Composer:
composer testsrc/
Application/ Small orchestration services around evaluation
Command/ Symfony CLI entrypoints
Domain/ Lambda, capabilities, execution context, primitive contracts
Infrastructure/ AI, Composio, Flow, ExpressionLanguage adapters
examples/ Small standalone scripts
tests/ Unit and integration-level tests for the MVP slice
This project is not a full multi-provider orchestration platform yet.
Out of scope for the current phase:
- multi-provider abstraction
- plugin systems
- advanced Flow orchestration
- Church/Lambda research-grade modeling
- distributed agents
- non-local LLM orchestration
The goal right now is a credible, executable foundation around:
Lambda -> Capability -> Execution