Skip to content

feat(deployment): add agent-service and litellm to single-node deployment - #4544

Merged
bobbai00 merged 19 commits into
apache:mainfrom
bobbai00:branch-3-prime-docker-compose
May 1, 2026
Merged

bobbai00 merged 19 commits into
apache:mainfrom
bobbai00:branch-3-prime-docker-compose

Conversation

@bobbai00

@bobbai00 bobbai00 commented Apr 28, 2026 •

Copy link
Copy Markdown
Contributor

What changes were proposed in this PR?

This PR wires the agent-service and a LiteLLM proxy into bin/single-node so the texera agent works end-to-end in the single node deployment.

Any related issues, documentation, discussions?

Closes #4499

How was this PR tested?

  • Manually export LLM API Key and then docker compose up.

Was this PR authored or co-authored using generative AI tooling?

Generated-by: Claude Code (Opus 4.7)

Wires the agent-service and a LiteLLM proxy into bin/single-node so the
agent panel works end-to-end out of the box. Adds bin/agent-service.dockerfile
to build the bun-based agent-service image.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
@github-actions github-actions Bot added the infra label Apr 28, 2026
@bobbai00 bobbai00 self-assigned this Apr 28, 2026

@aglinxinyuan aglinxinyuan left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Per discussion in PR #4495.

The build-and-push workflow auto-discovers bin/*.dockerfile but maps
service-name -> image-name explicitly. Without this case, agent-service
would be pushed as ghcr.io/apache/agent-service rather than
ghcr.io/apache/texera-agent-service, mismatching the single-node
docker-compose.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
@github-actions github-actions Bot added the ci changes related to CI label Apr 28, 2026

@Xiao-zhen-Liu Xiao-zhen-Liu left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@aglinxinyuan

Copy link
Copy Markdown
Contributor

Are we introducing any new license in the agent-service and the litellm binary?

bobbai00 and others added 5 commits April 27, 2026 23:25
Drop the model list to one model per provider — claude-haiku-4.5,
gpt-5.2, gemini-2.5-pro — and document how to add more. Move the LLM
keys out of env_file and into the litellm service's environment block
using \${VAR:-} substitution so users can supply a key inline:

  ANTHROPIC_API_KEY=sk-... docker compose up

without editing .env.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
@bobbai00 bobbai00 changed the title feat(deploy): add agent-service and litellm to single-node compose feat(deployment): add agent-service and litellm to single-node compose Apr 29, 2026
@Yicong-Huang

Copy link
Copy Markdown
Contributor

Are we introducing any new license in the agent-service and the litellm binary?

did we check litellm's version? need to be > v1.83.0 https://docs.litellm.ai/blog/security-update-march-2026

@github-actions github-actions Bot added the docs Changes related to documentations label Apr 29, 2026
@bobbai00

Copy link
Copy Markdown
Contributor Author

Are we introducing any new license in the agent-service and the litellm binary?

Based on my understanding, we are not introducing a new binary; we are just releasing the docker compose, which is a set of yaml files. When users run docker compose up, binaries like litellm images, minio images will be installed on users' laptop.

Based on this understanding, we don't need to add license attribution for litellm and other images.

bobbai00 and others added 4 commits April 30, 2026 01:05
Add an "Enable the AI Agent" section explaining the default Claude Haiku
4.5 setup via LiteLLM, and an "Add more AI models or providers"
subsection covering both litellm-config.yaml and docker-compose.yml
changes. Trim litellm-config.yaml to the default model and drop the
empty LLM key block from .env (docker-compose already defaults them to
empty).

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Rename "AI agent" → "Texera agent" across the README and docker-compose
service comment. Distinguish the agent from the underlying LLM (Claude
Haiku 4.5) in the Enable section, and rename "Add more AI models or
providers" → "Add more LLMs or providers". Add a usage paragraph with
an example prompt so first-time readers know how to invoke the agent.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Restore default IMAGE_REGISTRY=ghcr.io/apache, pin litellm to 1.83
instead of main-stable for reproducible builds, and shorten a few
inline comments in .env and docker-compose.yml.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Move them to the improve-logging-for-agent-service branch so this PR is
scoped to docker-compose / nginx / litellm wiring only.
@github-actions github-actions Bot removed the service label Apr 30, 2026

@kunwp1 kunwp1 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested the docker compose with change and everything went smoothly for me. I left one comment.

Comment thread bin/single-node/README.md Resolved
@bobbai00

bobbai00 commented May 1, 2026

Copy link
Copy Markdown
Contributor Author

Are we introducing any new license in the agent-service and the litellm binary?

did we check litellm's version? need to be > v1.83.0 https://docs.litellm.ai/blog/security-update-march-2026

I pinned to 1.83.10-stable

@bobbai00 bobbai00 changed the title feat(deployment): add agent-service and litellm to single-node compose feat(deployment): add agent-service and litellm to single-node deployment May 1, 2026
@bobbai00
bobbai00 enabled auto-merge (squash) May 1, 2026 05:02
@bobbai00
bobbai00 merged commit 2565dad into apache:main May 1, 2026
18 checks passed
bobbai00 added a commit that referenced this pull request May 1, 2026
… single-node deployment (#4592)

### What changes were proposed in this PR?

Backport of #4544.

### Any related issues, documentation, discussions?


### How was this PR tested?


### Was this PR authored or co-authored using generative AI tooling?

Co-authored-by: Claude Opus 4.7 (1M context) <[email protected]>
Co-authored-by: Xinyuan Lin <[email protected]>
Co-authored-by: Chen Li <[email protected]>
yangzhang75 pushed a commit to yangzhang75/texera that referenced this pull request Jun 22, 2026
…ment (apache#4544)

### What changes were proposed in this PR?

This PR wires the agent-service and a LiteLLM proxy into
`bin/single-node` so the texera agent works end-to-end in the single
node deployment.

### Any related issues, documentation, discussions?

Closes apache#4499 

### How was this PR tested?

- Manually export LLM API Key and then `docker compose up`.

### Was this PR authored or co-authored using generative AI tooling?

Generated-by: Claude Code (Opus 4.7)

---------

Co-authored-by: Claude Opus 4.7 (1M context) <[email protected]>
Co-authored-by: Xinyuan Lin <[email protected]>
Co-authored-by: Chen Li <[email protected]>
renovate-bot pushed a commit to renovate-bot/apache-_-texera that referenced this pull request Nov 26, 2026
### What changes were proposed in this PR?

Remove redundant code from the frontend, the licensing scripts, two
Scala sources and the agent service (**+26/−41 lines**). There is no
behavior change.

- **Dataset and model detail pages:** each `route.params` emission was
switched to `this.route.data`, and the empty `.subscribe()` threw away
what that emitted. The pages now `tap` the params, so the same fetches
run in the same order without the extra subscription. The dataset page's
`THROTTLE_TIME_MS` also becomes file-local: `workspace.component.ts` and
the hub spec import the copy in `hub-workflow-detail.component.ts`,
never this one.
- **Version uploader:** the abort handler's 404 branch called `done()`
and returned, which is what the handler already does for every error it
does not retry. Its three constants become file-local: nothing imported
`FINISHED_TASK_HIDE_DELAY_MS`, and only the spec imported the other two.
The spec now states the retry policy it expects.
- **Computing-unit actions:** `confirmAndTerminate` reads
`unit.computingUnit.uri` and `unit.computingUnit.name` before
`unit?.computingUnit.type`, so the `?.` goes.
- **Loop blocks:** `LOOP_END_OP_TYPE` becomes file-local. Only its spec
imported it, and the spec now checks the backend's `"LoopEnd"` name
directly.
- **Agent interaction:** two imports from `agent.service` become one.
- **Licensing scripts:** `audit_jar_licenses.py` stored each group's
notice hash in a field that nothing reads, and the NOTICE test helper
`make_jar` had an `extra` parameter that no caller passes.
- **`PveResource`:** drops `import javax.ws.rs.DELETE` and `import
javax.ws.rs.PathParam`, which `import javax.ws.rs._` already covers.
- **`SQLSourceOpExec` and `AsterixDBSourceOpExec`:** five fallback arms
list `BOOLEAN`, `STRING` and `ANY` before a trailing `_`, as in `case
AttributeType.BOOLEAN | AttributeType.STRING | AttributeType.ANY | _`.
The `_` matches those types as well, so each becomes `case _`.
- **`agent-service/.dockerignore`:** Docker reads the ignore file at the
root of the build context. CI's image matrix
(`build-and-push-images.yml`) and `bin/build-images.sh` both use the
repository root as the context, and the agent Dockerfile copies
`agent-service/...` paths from there, so the root `.dockerignore`
applies and this file is never read.

| Event | PR / Commit |
| --- | --- |
| Introduced by | Dataset and model detail: apache#2413 (2024-02-26), apache#3269
(2025-02-19), apache#8072 (2026-08-28); version uploader: apache#4136 (2026-01-05),
moved by apache#8078 (2026-08-31); computing-unit actions: apache#4331 (2026-04-09);
loop blocks: apache#8640 (2026-10-24); agent interaction: apache#6009 (2026-11-13);
licensing scripts: apache#4387 (2026-04-29), apache#5417 (2026-06-10);
`PveResource`: apache#5035 (2026-05-13); `SQLSourceOpExec`: apache#1013
(2021-02-11); `AsterixDBSourceOpExec`: apache#1044 (2021-02-25);
`agent-service/.dockerignore`: apache#4495 (2026-04-28) |
| Usage removed by | `agent-service/.dockerignore`: apache#4544 (2026-05-01)
added the agent image's Dockerfile with paths from the repository root,
so no build has read the file. Everything else: unused or redundant
since introduction. |

As of 2026-11-25:
- The SQL sources' fallback arms have listed redundant types for over 5
years.
- The dataset page's discarded subscription is almost 3 years old.
- The version uploader's 404 branch has been redundant for over 10
months.
- `agent-service/.dockerignore` has gone unread for almost 7 months.
- The duplicate agent import is 12 days old.

### Any related issues, documentation, discussions?

Closes apache#9691.

### How was this PR tested?

Ran on this branch and on `main` at `afc2b3db7a` (Windows 11; Node 24
with Yarn 4.14.1; Python 3.12 with pytest 9.0.3 and CI's pinned `ruff`
0.14.7; JDK 17):

```bash
cd frontend
npx ng test --watch=false --include='**/dataset-detail.component.spec.ts' --include='**/model-detail.component.spec.ts' --include='**/version-uploader.component.spec.ts' --include='**/computing-unit-actions.service.spec.ts' --include='**/loop-block.util.spec.ts' --include='**/agent-interaction.component.spec.ts'
npx tsc --noEmit -p src/tsconfig.app.json
npx tsc --noEmit -p src/tsconfig.spec.json
yarn prettier-eslint --list-different $(git diff --name-only --relative origin/main -- src)
yarn eslint $(git diff --name-only --relative origin/main -- src)
cd ..
pytest bin/licensing
ruff check bin/licensing/audit_jar_licenses.py bin/licensing/test_generate_notice_binary.py
python bin/licensing/audit_jar_licenses.py <directory of 60 jars>
sbt "WorkflowOperator/testOnly org.apache.texera.amber.operator.source.sql.*" "WorkflowExecutionService/testOnly org.apache.texera.web.resource.pythonvirtualenvironment.*" WorkflowOperator/scalafmtCheckAll WorkflowExecutionService/scalafmtCheckAll "WorkflowOperator/scalafixAll --check" "WorkflowExecutionService/scalafixAll --check"
```

- **Frontend:** the six specs run 379 tests, all passing on both sides.
Both typechecks, prettier-eslint and ESLint pass.
- **Python:** the licensing tests run 53 tests and 5 subtests, all
passing on both sides, and Ruff passes. `audit_jar_licenses.py` prints
the same report on both sides for 60 jars from the local Coursier cache.
- **Scala:**
  - The 11 `source.sql` suites run 204 tests, all passing on both sides.
- The two PVE resource suites run 75 tests on both sides: 74 pass and 1
is canceled. The canceled test needs a file that is not executable,
which this Windows filesystem cannot represent.
  - scalafmt and scalafix pass on both modules.
- **`agent-service/.dockerignore`:** no image was built. The build
context comes from `context="."` for every
`bin/dockerfiles/*.dockerfile` in `build-and-push-images.yml`, and from
the `..` that `bin/build-images.sh` passes from `bin/`.

### Was this PR authored or co-authored using generative AI tooling?

Generated-by: Claude Code (Claude Opus 5.5)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci changes related to CI docs Changes related to documentations infra

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add LLM agent to the bin/single-node

6 participants