Repository navigation
feat: AgentClient for calling one agent through the Agent Execution API - #116
Merged
Merged
Conversation
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
AgentClientin Rust, Python and TypeScript. It calls one agent through its agent URL with an agent key (evr_ak_…) or another channel credential, and never reaches the management API. It readsEVERRUNS_AGENT_URLandEVERRUNS_AGENT_KEY.runtime_token.run(text, session_id?)sends a message and returns the agent's reply.for_end_user/forEndUsergives a derived client that sendsEnd-Useron every request.idempotency_keypasses through as theIdempotency-Keyheader./v1/channels/{channel_id}) and serve apps (/v1/channels/{agent}) answer the same routes. This matches upstream everruns#4419, #4438, #4490, #4511 and #4514.AgentClient.DeprecationWarning.@deprecated.#[deprecated], so existing-D warningsbuilds keep compiling.AgentClientbecauseAgentis already the management model type.specs/agent-client.md. Each README now opens with "Call your agent from code", and each language has an example and a cookbook entry that run against a real agent.Test Plan
New mock-server tests in each language cover:
End-Usersent only on the derived clientIdempotency-Keypass-throughcode) and 429runon a new session, on an existing session (it streams after the newest sequence, so earlier turns are not replayed), and onturn.failedResults:
just lint,just testandjust pre-pushpass. The examples were not run against a live agent.Checklist
Generated by Claude Code