-
Notifications
You must be signed in to change notification settings - Fork 8
Agent SDK: merge Agentspan + porting-spec conformance #127
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
+58,625
−1
Closed
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
521c644
merge Agentspan Java SDK: conductor-ai modules, sources verbatim
dff290e
add agent-e2e workflow: e2e suites vs released agentspan server jar
71b3027
docs: agent SDK coordinate pass, README pointer, changelog entry
b261ff7
refactor: relocate agent control-plane clients into conductor-client
bd96f2d
refactor(client): AgentClient interface + OrkesAgentClient with full …
f9b9eea
feat(ai): verb contract (serve=deploy+serve, blocking flag), handle l…
2f52b1f
feat(ai)!: worker credentials via TaskDef/Task runtimeMetadata, fail-…
c0f9771
feat(ai): liveness monitor for stateful runs; swarm transfer hand-off…
0e8f815
docs(ai): CHANGELOG final surface, runtimeMetadata contract doc, port…
b73e210
ci: pin agent-e2e GITHUB_TOKEN to contents:read (CodeQL alert)
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,143 @@ | ||
| name: Agent E2E | ||
|
|
||
| # Runs the agent e2e suites (conductor-ai-e2e/) against a released server JAR | ||
| # with the agent runtime baked in, in two flavors: | ||
| # - conductor-oss: the Conductor OSS server boot JAR (Maven Central) — the | ||
| # server this SDK ships against | ||
| # - agentspan: the Agentspan server release JAR (kept alongside) | ||
| # | ||
| # These tests call real LLMs via the OPENAI_API_KEY / ANTHROPIC_API_KEY | ||
| # repo secrets. The suites themselves never read the keys (asserted by | ||
| # Suite2ToolCallingCredentials) — only the server process gets them. | ||
| # Fork PRs cannot see repo secrets, so for them the run fails at the | ||
| # silently-empty guard rather than passing vacuously. | ||
|
|
||
| on: [pull_request, workflow_dispatch] | ||
|
|
||
| # least privilege: the token is only used to download the public agentspan | ||
| # release JAR (gh release download) — read access suffices | ||
| permissions: | ||
| contents: read | ||
|
|
||
| concurrency: | ||
| group: agent-e2e-${{ github.ref }} | ||
| cancel-in-progress: true | ||
|
|
||
| jobs: | ||
| agent-e2e: | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| include: | ||
| # Pinned server releases — bump deliberately. Credential wire delivery | ||
| # (runtimeMetadata) needs conductor-oss PR #1255 (agentspan ≥ 0.4.3). | ||
| - server: conductor-oss | ||
| version: "3.32.0-rc.8" | ||
| - server: agentspan | ||
| version: "0.4.4" | ||
| name: agent-e2e (${{ matrix.server }} ${{ matrix.version }}) | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 45 | ||
| env: | ||
| OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} | ||
| ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }} | ||
| AGENTSPAN_SERVER_URL: http://localhost:8080/api | ||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Set up Java | ||
| uses: actions/setup-java@v4 | ||
| with: | ||
| distribution: temurin | ||
| java-version: '21' | ||
|
|
||
| # Python is only needed for mcp-testkit and the XML guard. | ||
| # No `cache: pip` — it hard-fails without a requirements file. | ||
| - name: Set up Python | ||
| uses: actions/setup-python@v5 | ||
| with: | ||
| python-version: '3.12' | ||
|
|
||
| - name: Cache server JAR | ||
| id: jar_cache | ||
| uses: actions/cache@v4 | ||
| with: | ||
| path: agentspan-server.jar | ||
| key: server-jar-${{ matrix.server }}-${{ matrix.version }} | ||
|
|
||
| - name: Download server JAR | ||
| if: steps.jar_cache.outputs.cache-hit != 'true' | ||
| env: | ||
| GH_TOKEN: ${{ github.token }} | ||
| SERVER_VERSION: ${{ matrix.version }} | ||
| run: | | ||
| if [ "${{ matrix.server }}" = "conductor-oss" ]; then | ||
| curl -fL --retry 3 -o agentspan-server.jar \ | ||
| "https://repo1.maven.org/maven2/org/conductoross/conductor-server/${SERVER_VERSION}/conductor-server-${SERVER_VERSION}-boot.jar" | ||
| else | ||
| gh release download "v${SERVER_VERSION}" --repo agentspan-ai/agentspan \ | ||
| --pattern "agentspan-server-${SERVER_VERSION}.jar" --output agentspan-server.jar | ||
| fi | ||
|
|
||
| - name: Install mcp-testkit | ||
| run: | | ||
| python -m pip install --upgrade pip | ||
| pip install mcp-testkit | ||
|
|
||
| - name: Start mcp-testkit | ||
| run: | | ||
| mcp-testkit --transport http --port 3001 & | ||
| sleep 2 | ||
|
|
||
| - name: Start server | ||
| run: | | ||
| java -jar agentspan-server.jar --server.port=8080 > server.log 2>&1 & | ||
|
|
||
| - name: Wait for server health | ||
| run: | | ||
| for i in $(seq 1 45); do | ||
| if curl -sf http://localhost:8080/health | grep -q '"healthy"[[:space:]]*:[[:space:]]*true'; then | ||
| echo "server healthy after ~$((i*2))s"; exit 0 | ||
| fi | ||
| sleep 2 | ||
| done | ||
| echo "::error::server failed to become healthy within 90s" | ||
| tail -100 server.log | ||
| exit 1 | ||
|
|
||
| - name: Run e2e suites | ||
| run: ./gradlew :conductor-ai-e2e:test -Pe2e | ||
|
|
||
| # BaseTest assumeTrue-skips every suite when the server is unreachable — | ||
| # without this guard a boot failure after the health gate (or a future | ||
| # gate regression) would yield a green job that ran nothing. | ||
| - name: Guard against silently-empty runs | ||
| if: always() | ||
| run: | | ||
| python - <<'EOF' | ||
| import glob | ||
| import sys | ||
| import xml.etree.ElementTree as ET | ||
|
|
||
| total = executed = 0 | ||
| for path in glob.glob("conductor-ai-e2e/build/test-results/test/TEST-*.xml"): | ||
| root = ET.parse(path).getroot() | ||
| t = int(root.get("tests", 0)) | ||
| sk = int(root.get("skipped", 0)) | ||
| total += t | ||
| executed += t - sk | ||
| print(f"executed {executed}/{total} tests") | ||
| sys.exit(0 if executed > 0 else 1) | ||
| EOF | ||
|
|
||
| - name: Upload results | ||
| if: always() | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: agent-e2e-results-${{ matrix.server }} | ||
| path: | | ||
| conductor-ai-e2e/build/test-results/test/ | ||
| conductor-ai-e2e/build/reports/tests/test/ | ||
| server.log | ||
| retention-days: 14 | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,49 @@ | ||
| // End-to-end suites for the agent SDK. They need a live agentspan server | ||
| // (AGENTSPAN_SERVER_URL) plus server-side LLM credentials, so — like the `tests` | ||
| // module — every task is gated behind a property: run with -Pe2e. | ||
|
|
||
| plugins { | ||
| id 'jacoco' | ||
| } | ||
|
|
||
| dependencies { | ||
| testImplementation project(':conductor-ai') | ||
|
|
||
| // test dependencies | ||
| testImplementation "org.junit.jupiter:junit-jupiter-api:${versions.junit}" | ||
| testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:${versions.junit}" | ||
| testImplementation "ch.qos.logback:logback-classic:1.5.32" | ||
|
|
||
| // LLM frameworks: not imported by the suites directly, but the SDK's bridge | ||
| // classes (compileOnly there) need them on the runtime classpath when the | ||
| // framework-facing suites execute. | ||
| testImplementation "dev.langchain4j:langchain4j:${versions.langchain4j}" | ||
| testImplementation "dev.langchain4j:langchain4j-open-ai:${versions.langchain4j}" | ||
| testImplementation "com.google.adk:google-adk:${versions.googleAdk}" | ||
| testImplementation "org.bsc.langgraph4j:langgraph4j-core:${versions.langgraph4j}" | ||
| testImplementation "org.bsc.langgraph4j:langgraph4j-agent-executor:${versions.langgraph4j}" | ||
| } | ||
|
|
||
| // tool/agent parameter names are read reflectively at runtime | ||
| compileTestJava.options.compilerArgs << '-parameters' | ||
|
|
||
| test { | ||
| useJUnitPlatform() | ||
| finalizedBy jacocoTestReport // report is always generated after tests run | ||
| testLogging { | ||
| events = ["SKIPPED", "FAILED"] | ||
| exceptionFormat = "full" | ||
| showStandardStreams = true | ||
| } | ||
| } | ||
|
|
||
| tasks.withType(Test) { | ||
| // e2e suites are I/O-bound (LLM calls) and use unique agent/task names, | ||
| // so they can safely run concurrently. | ||
| maxParallelForks = 3 | ||
| } | ||
|
|
||
| jacocoTestReport { | ||
| dependsOn test // tests are required to run before generating the report | ||
| } | ||
| tasks.forEach(task -> task.onlyIf { project.hasProperty('e2e') }) |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.