Skip to content

docs: Agent workflow - #513

Merged
patriknw merged 3 commits into
agent-devfrom
wip-agent-docs2-patriknw
Jun 4, 2025
Merged

patriknw merged 3 commits into
agent-devfrom
wip-agent-docs2-patriknw

Conversation

@patriknw

@patriknw patriknw commented Jun 4, 2025

Copy link
Copy Markdown
Contributor

No description provided.

@github-actions github-actions Bot added the documentation documentation related label Jun 4, 2025
private Step error() {
return step("error")
.call(() -> null)
.andThen(() -> effects().end());

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I think we should take the opportunity to see if can reduce boilerplate in workfows. For example, it would be nice with a step without a call.

(is above null result allowed?)

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.

Most likely, it will fail on serialization.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

ok, I'll change to Done

Would be nice with

.noCall()
.andThen(() -> ...)

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 would use done() for now.

@aludwiko aludwiko 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

Comment thread docs/src/modules/java/pages/agents.adoc Outdated
=== Drive the agents from a workflow
== Drive the Agent from a workflow

Agents make external calls to the AI model and possibly other services, and therefore it is important to have solid error handling and durable execution steps when calling agents. Agents should therefore be called from a xref:workflows.adoc[Workflow].

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.

Agents should therefore be called from a -> I would change that to sth less strict, e.g. A good example is calling agents from a Workflow

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

ok, adjusted, and added some more: 8fb5193

[source,java]
----
.timeout(Duration.ofSeconds(120))
include::example$doc-snippets/src/main/java/com/example/application/ActivityAgentManager.java[tag=all]

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.

You can exclude the

private static final Logger logger = LoggerFactory.getLogger(ActivityAgentManager.class);

from the snippet.

@patriknw
patriknw merged commit 98ab52d into agent-dev Jun 4, 2025
@patriknw
patriknw deleted the wip-agent-docs2-patriknw branch June 4, 2025 14:36
beritou pushed a commit that referenced this pull request Jun 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation documentation related

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants