Skip to content

[Agent] Introduce capabilities#1572

Open
Guikingone wants to merge 1 commit intosymfony:mainfrom
Guikingone:agent/policy
Open

[Agent] Introduce capabilities#1572
Guikingone wants to merge 1 commit intosymfony:mainfrom
Guikingone:agent/policy

Conversation

@Guikingone
Copy link
Contributor

@Guikingone Guikingone commented Feb 9, 2026

Q A
Bug fix? no
New feature? yes
Docs? yes
Issues --
License MIT

This PR aims to introduce the support for "policies" at the Agent level, Policies are a way to enable/disable features in agents (think of it like stamps on Messenger messages` or "feature-flags").

This PR is an extension of a discussion with @chr-hertel last week about the refactoring of Agent, the main goal is to allow adding new features depending on the configuration of an agent and the enabled policies (for example, we might want to enable SpeechPolicy to add the support for Speech as implemented in #943, it can also help the introduction of Evaluator later and many more).

For now, two policies are implemented (for demo purpose and tests), the configuration is done and tested, same for the agent implementation.

@Guikingone Guikingone force-pushed the agent/policy branch 5 times, most recently from 8978998 to eb5cd97 Compare February 10, 2026 16:59
@Guikingone Guikingone marked this pull request as ready for review February 10, 2026 17:03
@carsonbot carsonbot added Agent Issues & PRs about the AI Agent component Feature New feature Status: Needs Review labels Feb 10, 2026
@Guikingone Guikingone force-pushed the agent/policy branch 4 times, most recently from 6aeee5c to 4d0c2a9 Compare February 14, 2026 10:18
@chr-hertel
Copy link
Member

chr-hertel commented Feb 14, 2026

okay, thinking out loud here ...


let's collect some use-cases here:

if i get it right, the main difference to processors is, that users by design influence it per agent call, right?
looking at the code here it feels a bit redundant to have those extension points just next to each other, but i like the more structured invokation

so i would configure an agent with a SpeechPolicy, and i would configure the usage of it via state object in $policies while calling the agent

why "policy"? doesn't click with me directly .. what about "behaviour"?


my bottonline:

  • interesting!
  • can we streamline with processors extension point?
  • can we bring in more examples?
  • naming?

@Guikingone
Copy link
Contributor Author

Guikingone commented Feb 14, 2026

delay (like implemented, not sure why we need that tho?)

Just for example here, can't implement the stt-tts one without this PR 😄

evaluation (would it really be within the agent?)

Input/Output evaluation as we might have a situation where you're configuring the Evaluator (name to refine TBH) to evaluate certain aspects of them then you're using a "policy" to override the "rules" applied at runtime (like groups for validation).

some i18n feature maybe?

Could be something to explore.

guardrails / YOLO mode

Why not 😄

if i get it right, the main difference to processors is, that users by design influence it per agent call, right?
looking at the code here it feels a bit redundant to have those extension points just next to each other, but i like the more structured invokation

Yes, kind of, "policies" are here to be like stamps on messages or "feature-flags", if you take the speech one, the current implementation is not perfect as once it's configured, all agents have it, thanks to policies, you can decide at runtime which agent will receive specific speech configuration (and you can even change after defining them) depending on a particular situation.

The name is open to debate, I used policies as I mentioned them during our conversation on the agent, after thinking about it, maybe Capability is more accurate (as you're allowing an agent "to do something"), it's already used in the Platform but is that really an issue if the name is used twice? Open to debate 😅

can we streamline with processors extension point?

Actually yes, one solution might be to define a Policy|CapabilityInputProcessor and interact with the Input|Output in the processor, as they're actually called at the same moment, not a big issue.

can we bring in more examples?

Actually, I might have another example for policies/capabilities/nametodefine with "delegating" agents, could be something to explore on this PR (not a load of work to do).

@OskarStark
Copy link
Contributor

Should be mentioned here IMHO: https://symfony.com/doc/current/ai/index.html#key-features

@Guikingone Guikingone changed the title [Agent] Introduce policies [Agent] Introduce capabilities Feb 23, 2026
@Guikingone Guikingone force-pushed the agent/policy branch 7 times, most recently from e1a271c to 72e6d62 Compare February 26, 2026 08:45
@Guikingone
Copy link
Contributor Author

Hi @chr-hertel @OskarStark 👋

Just pushed a refactoring of "policies", name is now Capability and is improved on the API (agent-aware, improvement on public interfaces, etc), I also worked on preparing the pipes for #1548, I let you review it when you have time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Agent Issues & PRs about the AI Agent component Feature New feature Status: Needs Review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants