davsclaus opened a new pull request, #140:
URL: https://github.com/apache/camel-jbang-examples/pull/140

   _Claude Code on behalf of Claus Ibsen_
   
   A new example on the `ai` rung, right after `mcp-server`, whose two shop 
tools (`stock_level`, `order_status`) it reuses. Three customer questions about 
orders and stock go to camel-openai on a local Ollama model (`granite4:3b`, the 
model `camel infra run ollama` pulls).
   
   The model knows nothing of the shop. `tags: shop` makes camel-openai offer 
it the two `ai-tool` routes as tools, run the tool calls the model asks for, 
and hand the results back until the model answers. Question 3 needs both tools, 
and the model asks for them in one turn.
   
   Run with `camel run * --observe` and `camel.aiObservability.level=full`, and 
the Camel TUI follows each agent run. `--observe` also adds 
`camel-ai-observability` by itself when the routes use a GenAI component, so 
the example needs no dependency line. The README teaches the flag, and its 
screenshots (taken from this example) show what the TUI then gives:
   
   ![The agent run of the third 
question](https://raw.githubusercontent.com/apache/camel-jbang-examples/ai-agent-tools/ai/agent-tools/agent-tools-tui-agent-run.png)
   
   **What it teaches**
   
   - An agent with Camel: `openai:chat-completion` with `tags` picks up 
`ai-tool` routes as tools (`autoToolExecution`, on by default).
   - The GenAI observability levels: `basic` records the model calls, 
`detailed` adds the agent runs and tool calls, and `full` adds the messages.
   - Following an agent run in the Camel TUI:
     - the AI usage view (`Ctrl+U` in the AI panel)
     - the Spans waterfall, with the agent-run summary and `t` for the 
conversation
   
   **Needs Camel 4.24.** The level option and the TUI views are new in 4.24 
(CAMEL-27131, and 
[CAMEL-27135](https://issues.apache.org/jira/browse/CAMEL-27135): 
apache/camel#30521, #30522, #30523), so `metadata.json` says "Camel 4.24 or 
newer", as `fail-well/chaos` does.
   
   **Also in this PR**
   
   - `openai-pii-redaction` and `docling-langchain4j-rag` move one place down 
the `ai` rung (`order` 5 and 6).
   - The group intro in `generate-catalog.sh` mentions the agent.
   - The catalog and the README tables are regenerated with 
`./generate-catalog.sh`.
   
   **Tried**
   
   - `camel validate yaml --canonical agent-tools.camel.yaml` passes.
   - `camel run * --observe` on Camel 4.24.0-SNAPSHOT with `granite4:3b` gives 
the log in the README; the line numbers are from that run.
   - The Citrus test, `test/agent-tools.citrus.it.yaml`, follows 
`langchain4j-chat`: Ollama on port 11435, wait for the model, run, then check 
that the model called a tool and answered the last question. Like the other 
local-model examples it has `ciSkip`, so it is not in the build workflow. **I 
have not run it locally** (it needs the Ollama container and a model download).
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to