Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
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
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# apollo

## 3.0.0

### Major Changes

- 57e49f0: enable global assistant multi step changes

### Patch Changes

- d46943e: add langfuse tag for job code generation

## 2.0.0

### Major Changes
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "apollo",
"module": "platform/index.ts",
"version": "2.0.0",
"version": "3.0.0",
"type": "module",
"scripts": {
"start": "NODE_ENV=production bun platform/src/index.ts",
Expand Down
248 changes: 160 additions & 88 deletions poetry.lock

Large diffs are not rendered by default.

16 changes: 8 additions & 8 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,29 +10,29 @@ requires-poetry = ">=2.3.2"

[tool.poetry.dependencies]
python = "3.11.*"
openai = "^2.41"
openai = "^2.44"
python-dotenv = "^1.2.2"
anthropic = "^0.109.1"
anthropic = "^0.112.0"

langchain-pinecone = "^0.2.13"
langchain-core = "^1.4"
langchain-community = "^0.4.2"
langchain-openai = "^1.3"
langchain-text-splitters = "^1.1"
nltk = "^3.9.3"
pytest = "^9.0.3"
sentry-sdk = "^2.62.0"
pytest = "^9.1.1"
sentry-sdk = "^2.63.0"
psycopg2-binary = "^2.9.10"
langfuse = "^4.0.1"
langfuse = "^4.12.0"
opentelemetry-instrumentation-anthropic = "^0.61.0"
opentelemetry-instrumentation-threading = "0.63b1"
opentelemetry-instrumentation-threading = "0.64b0"

[tool.poetry.group.dev]
optional = false

[tool.poetry.group.dev.dependencies]
pytest = "^9.0.3"
ruff = "^0.15.17"
pytest = "^9.1.1"
ruff = "^0.15.20"

[build-system]
requires = ["poetry-core"]
Expand Down
2 changes: 1 addition & 1 deletion services/global_chat/PAYLOAD_SPEC.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ This document defines the input and output payload structure for the Global Agen

- **`response`** (string): The main text response from the agent.

- **`attachments`** (array): Artifacts produced during this turn. Each entry has a `type` and `content` field. An empty list `[]` means no artifacts were produced (e.g. a purely informational response). Currently supported types: `workflow_yaml`, `job_code`. When both are present, `job_code` contains the suggested code for a specific job and `workflow_yaml` contains the full YAML with the code stitched in.
- **`attachments`** (array): Artifacts produced during this turn. Each entry has a `type` and `content` field. An empty list `[]` means no artifacts were produced (e.g. a purely informational response). The only supported type is `workflow_yaml`: the full workflow YAML with any job code changes stitched in. Job code edits are never returned separately — the YAML is the single source of truth, which allows multi-step changes in one response.

- **`history`** (array): Updated conversation history including the latest exchange. On direct routes (workflow_agent, job_code_agent), each entry has `content` as a string. On the planner path, entries may have `content` as an array of content blocks (`text`, `tool_use`, `tool_result`) — this is the raw Anthropic messages format from the tool-calling loop.

Expand Down
14 changes: 8 additions & 6 deletions services/global_chat/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,9 @@ Request to build a new multi-step workflow from scratch:
- `response`: The assistant's text response to the user
- `attachments`: Artifacts produced — currently always
`{type: "workflow_yaml", content: string}` when YAML was generated or modified
- `history`: Updated conversation history including the latest exchange
- `history`: Updated conversation history including the latest exchange. Direct
routes return string `content`; the planner path may return `content` as
Anthropic content-block arrays (`tool_use`/`tool_result`)
- `usage`: Aggregated token usage across all agents called during the request
- `meta.agents`: Ordered list of agents invoked (e.g.
`["router", "workflow_agent"]` or
Expand Down Expand Up @@ -163,18 +165,18 @@ then calls `call_job_code_agent` for each job that needs code. Job code is
stitched into the workflow YAML immediately after each call.

The loop continues until the model signals it is done (up to a configurable
maximum of tool calls, default 10).
maximum of tool calls, default 25).

## Testing

Run the multi-step planner tests with:
Run the fast unit tests (no LLM calls):

```bash
poetry run pytest global_chat/tests/test_planner_multistep.py -v -s
poetry run pytest services/global_chat/tests/unit/ -q
```

Run all tests for the service:
Run all tests for the service (some hit live LLM APIs and cost tokens):

```bash
poetry run pytest global_chat/tests/ -v -s
poetry run pytest services/global_chat/tests/ -v -s
```
Loading