joule-a2a-agent
Skill37 starsChanged 7 months agoApache-2.0View on GitHub
Generate and deploy a pro-code AI agent using LangGraph and SAP GenAI Hub, deploy it to SAP BTP Cloud Foundry, create a Joule capability with A2A (Agent-to-Agent) action, and deploy it to Joule. Supports TypeScript (Express or CAP) and Python. Use this skill whenever the user mentions: building a custom agent for Joule, deploying an AI agent to BTP Cloud Foundry, A2A protocol integration with Joule, pro-code agent extensibility, LangGraph agent on SAP BTP, connecting an external agent to Joule, "bring your own agent" for Joule, creating a Joule capability with A2A action, CAP agent, MTA deployment, or any combination of LangGraph/A2A/Joule/BTP/Cloud Foundry/CAP in an agent development context. Also trigger when the user wants to scaffold, modify, or redeploy an existing A2A agent project.
- Reads credentials
- Installs packages
1 other project uses a version of this.
Adopted by
Most recently taken up by
- SAP-archive/joule-a2a-agent-toolkitword for word, first seen Nov 8, 2026
Other versions1 project uses a version of this.
Word for word · 1
- SAP-archive/joule-a2a-agent-toolkit★ 42100% same
Edited · 0
None found.
Wrote their own version · 0
None found.
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
The file
Show its rules and text
We split this skill into the rules it gives an agent
14 rules. About 0 are common, 10 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈10
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 21
When a user's prompt matches your agent's capability, Joule sends an A2A task to your agent
- Distinctive: line 31
If your Joule tenant runs an older schema version, the compile will succeed but deploy will fail with: *"Schema version defined in config …
- Distinctive: line 64
When the user asks to create/modify a Joule A2A agent, follow these steps:
- Distinctive: line 76
If the user is unsure about BTP details, generate the project anyway with placeholder values.
- Distinctive: line 84
Run the scaffold script:
- Very specific: line 217
Read references/cf-deployment-typescript.md or references/cf-deployment.md.
- Distinctive: line 241
After deployment, create a BTP Destination pointing to the agent's URL:
- Very specific: line 254
Read references/joule-capability.md for the complete reference.
- Distinctive: line 275
Verify the response comes back correctly
- Very specific: line 277
If it doesn't work, check: destination configuration, agent card accessibility, capability scenario description matching, and CF app logs …
- Distinctive: line 281
When the user wants to change an existing agent:
- Distinctive: line 283
Adding a new tool: Add the tool function, register it in the agent, add a skill to the agent card.
- Very specific: line 285
Changing the model: Update MODEL_NAME env var.
- Distinctive: line 293
Read these before generating code:
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Joule A2A Agent on SAP BTP Cloud Foundry
This skill generates a complete pro-code AI agent project that:
- Implements an agent with A2A protocol v0.3.0 support using LangGraph + @a2a-js/sdk 0.3.10 and SAP GenAI Hub (OrchestrationClient) as the LLM provider
- Deploys to SAP BTP Cloud Foundry as a REST API (via
cf pushor MTA) - Creates a Joule capability with an A2A action using the multi-file DTA format
- Provides CLI commands to compile and deploy the capability to Joule
How This Works — The Big Picture
SAP Joule can orchestrate external agents using the A2A (Agent-to-Agent) protocol. The flow is:
- Your agent runs as a TypeScript or Python web service on Cloud Foundry, exposing an A2A-compatible endpoint
- Joule discovers your agent by reading its Agent Card at
/.well-known/agent.json - When a user's prompt matches your agent's capability, Joule sends an A2A task to your agent
- Your agent processes the request using LangGraph (with tools, LLM reasoning via SAP GenAI Hub, etc.) and returns the result
- Joule presents the result to the user in the chat
The connection between Joule and your agent uses a BTP Destination + a Joule capability YAML that defines an agent-request action type.
Prerequisites
Joule DTA Schema Version 3.28.0+ Required: Code-based agents (BYOA) using the agent-request action type are supported as of DTA schema version 3.28.0. The capability.sapdas.yaml must specify schema_version: "3.28.0".
If your Joule tenant runs an older schema version, the compile will succeed but deploy will fail with: "Schema version defined in config file is greater than the current schema version of Joule".
How to check your tenant's version:
- Login:
joule login --use-env(orjoule login) - Check status:
joule status - Try deploying — if you get the schema error, your tenant needs an update
- Contact your BTP admin to request a Joule service update
Other prerequisites:
- SAP BTP subaccount with Cloud Foundry enabled
- AI Core service instance with a GenAI Hub model deployed
- Joule CLI installed:
npm install -g @sap/joule-studio-cli - CF CLI installed and logged in (
cf loginorcf login) - Joule CLI logged in (
joule loginorjoule login --use-env) - Joule App2App IAS flow configured for Joule Studio CLI (assign required roles)
- BTP roles:
extensibility_developer+capabilityadminfor Joule deployments - For CAP agents:
mbt(MTA Build Tool):npm install -g mbt - For CAP agents: MTA CF CLI plugin:
cf install-plugin multiapps(required forcf deploywith.mtarfiles)
Before you start, make sure Claude Code is started with the toolkit plugin and you are logged in to both CLIs:
# Start Claude Code with the SAP A2A Agent Toolkit plugin
claude --plugin-dir <path-to-sap-a2a-agent-toolkit>
# Log in to Cloud Foundry
cf login -a https://api.cf.<landscape>.hana.ondemand.com
# Log in to Joule
joule login Workflow
When the user asks to create/modify a Joule A2A agent, follow these steps:
Step 1: Gather Requirements
Ask the user:
- Language — TypeScript (default) or Python?
- Framework — Express (default, lightweight) or CAP (enterprise, MTA deploy)? Note: CAP is TypeScript-only.
- Agent name and purpose — what should this agent do?
- Tools/APIs — what external services or APIs should the agent call?
- SAP GenAI Hub model — which model deployed on AI Core? (default:
gpt-4.1) - BTP landscape details — CF API endpoint, org, space (if they know them)
If the user is unsure about BTP details, generate the project anyway with placeholder values.
Step 2: Generate the Agent Project
The project can be generated in three configurations:
a) TypeScript + Express (default)
Run the scaffold script:
bash <skill-path>/scripts/scaffold-ts.sh \
--name <agent-name> \
--framework express \
--namespace <company-namespace> \
--output <output-dir> \
--description "<agent description>" \
--landscape <cf-landscape>Or manually using references/langgraph-a2a-agent-typescript.md + references/cf-deployment-typescript.md.
<agent-name>/
├── src/
│ ├── index.ts # Express + A2A server entry point
│ ├── agent.ts # LangGraph.js ReAct agent
│ ├── executor.ts # A2A protocol bridge
│ ├── agentCard.ts # Agent Card definition
│ ├── tools.ts # Agent's tools (Zod schemas)
│ └── llm.ts # SAP GenAI Hub configuration
├── joule-capability/
│ ├── capability.sapdas.yaml
│ ├── capability_context.yaml
│ ├── da.sapdas.yaml
│ ├── functions/call_agent.yaml
│ └── scenarios/invoke_agent.yaml
├── package.json
├── tsconfig.json
├── manifest.yml
├── Procfile
├── .env.example
└── README.mdb) TypeScript + CAP
Run the scaffold script:
bash <skill-path>/scripts/scaffold-ts.sh \
--name <agent-name> \
--framework cap \
--namespace <company-namespace> \
--output <output-dir> \
--description "<agent description>" \
--landscape <cf-landscape>Or manually using references/langgraph-a2a-agent-cap-typescript.md + references/cf-deployment-cap-typescript.md.
<agent-name>/
├── srv/
│ ├── server.ts # CAP bootstrap + A2A Express endpoints
│ ├── agent-executor.ts # LangGraph StateGraph agent orchestrator
│ ├── service.cds # CDS service definition
│ ├── tools/
│ │ └── tools.ts # Agent tools (Zod schemas)
│ └── utils/
│ ├── prompts.ts # System prompt
│ ├── a2aToLangchain.ts # A2A → LangChain converter
│ ├── a2a-operations.ts # A2A event helpers
│ └── helpers.ts # URL helpers
├── joule-capability/
│ ├── capability.sapdas.yaml
│ ├── capability_context.yaml
│ ├── da.sapdas.yaml
│ ├── functions/call_agent.yaml
│ └── scenarios/invoke_agent.yaml
├── package.json
├── tsconfig.json
├── mta.yaml
├── .cdsrc.sample.json
├── .env.example
└── README.mdc) Python + Express
Run the scaffold script:
python <skill-path>/scripts/scaffold.py \
--name <agent-name> \
--namespace <company-namespace> \
--output <output-dir> \
--description "<agent description>" \
--landscape <cf-landscape>Or manually using references/langgraph-a2a-agent.md + references/cf-deployment.md.
Key Differences
| Aspect | TS Express | TS CAP | Python |
| Server | Express + jsonRpcHandler/agentCardHandler | CAP + cds.on("bootstrap") | Starlette + A2AStarletteApplication |
| A2A SDK | @a2a-js/sdk 0.3.10 | @a2a-js/sdk 0.3.10 | a2a-sdk >=0.2.7 |
| LLM | OrchestrationClient | OrchestrationClient | langchain-openai ChatOpenAI (direct AI Core endpoint) |
| Deploy | cf push (manifest.yml) | mbt build && cf deploy (mta.yaml) | cf push (manifest.yml) |
| Auth | Manual | Built-in CAP auth | Manual |
| Agent pattern | createReactAgent | StateGraph (manual) | create_react_agent |
| Interrupt support | Basic (question heuristic) | Full (LangGraph interrupt()) | Structured response format |
| Buildpack | nodejs_buildpack | nodejs_buildpack (via MTA) | python_buildpack |
| Reference | langgraph-a2a-agent-typescript.md | langgraph-a2a-agent-cap-typescript.md | langgraph-a2a-agent.md |
The Joule capability YAML files are identical regardless of language/framework.
Step 3: Customize the Agent
Based on the user's requirements:
- Define tools — In TypeScript: functions created with
tool()and Zod schemas. In Python: functions decorated with@tool. Map each user requirement to a tool function.- Express TS:
src/tools.ts - CAP TS:
srv/tools/tools.ts - Python:
app/tools.py
- Express TS:
- Configure the agent — Set the system instruction to match the agent's purpose.
- Express TS:
SYSTEM_PROMPTinsrc/agent.ts - CAP TS:
srv/utils/prompts.ts - Python:
SYSTEM_INSTRUCTIONinapp/agent.py
- Express TS:
- Set up the Agent Card — Name, skills, and supported modes.
- Express TS:
src/agentCard.ts - CAP TS:
agentCardinsrv/server.ts - Python:
app/agent_card.py
- Express TS:
- Configure
capability.sapdas.yaml— The scenario description inscenarios/invoke_agent.yamlmust clearly describe when Joule should invoke this agent.
Step 4: Deploy to Cloud Foundry
Express (TypeScript or Python)
Read references/cf-deployment-typescript.md or references/cf-deployment.md.
cd <agent-name>
npm install
npm run build # TypeScript only — must compile before push
cf push
curl https://<app-url>/.well-known/agent.jsonCAP (TypeScript)
Read references/cf-deployment-cap-typescript.md.
cd <agent-name>
npm install
mbt build
cf deploy mta_archives/<agent-name>_1.0.0.mtar
curl https://<agent-name>-srv.cfapps.<landscape>.hana.ondemand.com/.well-known/agent.jsonStep 5: Create the BTP Destination
After deployment, create a BTP Destination pointing to the agent's URL:
bash <skill-path>/scripts/create-destination.sh \
--agent-name <agent-name> \
--destination-name <DESTINATION_NAME> \
--landscape <cf-landscape>The destination name must match system_aliases.<AliasName>.destination in capability.sapdas.yaml.
Step 6: Deploy the Joule Capability
Read references/joule-capability.md for the complete reference.
# Install Joule CLI (if not installed)
npm install -g @sap/joule-cli
# Authenticate
joule login # or joule login --use-env
# Navigate to the joule-capability directory
cd joule-capability
# Compile + deploy
joule deploy ./da.sapdas.yaml --compile -n "<assistant_name>"Step 7: Test the Integration
- Open Joule in your SAP system
- Type a prompt that matches the capability's scenario description
- Joule should route the request to your agent via A2A
- Verify the response comes back correctly
If it doesn't work, check: destination configuration, agent card accessibility, capability scenario description matching, and CF app logs (cf logs <app-name> --recent).
Modifying an Existing Agent
When the user wants to change an existing agent:
- Adding a new tool: Add the tool function, register it in the agent, add a skill to the agent card. Redeploy to CF.
- Changing the model: Update
MODEL_NAMEenv var. The model must be deployed on your AI Core instance. - Updating the Joule capability: Edit
capability.sapdas.yamland scenario files, recompile and redeploy withjoule deploy ./da.sapdas.yaml --compile. - Scaling: Adjust
instancesandmemoryinmanifest.yml(Express) ormta.yaml(CAP).
Reference Files
Read these before generating code:
LangGraph + A2A SDK
references/langgraph-a2a-agent-typescript.md— TypeScript Express templates (jsonRpcHandler, agentCardHandler, createReactAgent, OrchestrationClient)references/langgraph-a2a-agent-cap-typescript.md— TypeScript CAP templates (cds.on bootstrap, StateGraph, interrupt support)references/langgraph-a2a-agent.md— Python templates (A2AStarletteApplication, create_react_agent, langchain-openai with direct AI Core credentials)
Cloud Foundry Deployment
references/cf-deployment-typescript.md— TypeScript Express: manifest.yml, package.json, cf pushreferences/cf-deployment-cap-typescript.md— TypeScript CAP: mta.yaml, mbt build, cf deployreferences/cf-deployment.md— Python: manifest.yml, requirements.txt, Procfile
Joule Integration
references/joule-capability.md— Multi-file DTA format: capability.sapdas.yaml (schema 3.28.0), da.sapdas.yaml (schema 1.4.0), functions/, scenarios/, multi-turn contextId/taskId pattern
Important Notes
- The A2A protocol v0.3.0 uses JSON-RPC 2.0 over HTTP(S). Your agent must handle
message/sendand optionallymessage/streammethods. - Agent Cards must be served at
/.well-known/agent.jsonfor Joule's discovery. - SAP GenAI Hub requires an AI Core service instance and a deployment of the model you want to use.
- TypeScript agents use
OrchestrationClientfrom@sap-ai-sdk/langchain(auto-reads VCAP_SERVICES). - Python agents use
langchain-openaiChatOpenAIpointed at AI Core's OpenAI-compatible endpoint (do NOT usegenerative-ai-hub-sdk— pydantic version conflict witha2a-sdk). - The Joule CLI (
@sap/joule-cli) requires thecapabilityadminandextensibility_developerroles. - Destinations in BTP must use NoAuthentication or OAuth2ClientCredentials.
- CAP is only available for TypeScript. Python uses Express (Starlette) only.
- The
da.sapdas.yamluses schema version1.4.0. Thecapability.sapdas.yamluses3.28.0. - Namespace must be
joule.ext— themetadata.namespaceincapability.sapdas.yamlmust be set tojoule.ext. Using any other namespace (e.g.mycompany) will causejoule deployto fail with a namespace validation error. The scaffold scripts default tojoule.ext. - CAP agents require two extra tools:
mbt(npm install -g mbt) for building and the MTA CF CLI plugin (cf install-plugin multiapps) forcf deployto work with.mtarfiles. See CAP deploy to CF guide.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

