Agent Reflection
Use the narrowest client surface that matches what the caller knows:
- Use a generated or definition-owned client when the target type and methods are known in source.
- Use a caller-owned contract when the target implementation is not imported but its identity and method schemas are known.
- Use runtime reflection when the type or method is selected dynamically and the caller needs registered constructor, input, or output schemas.
- Use a schema-free dynamic client only when infrastructure deliberately works with schema-native values and arbitrary method names.
Agent identity strings are environment-scoped. Reflection identities do not include a component ID: the runtime resolves the agent type's implementing component within the caller's environment. Component-bearing IDs belong to lower-level host-management APIs, not reflection clients.
Discovery lookups are optional: a name or identity lookup returns no type when the deployment is missing, the identity is malformed, or the caller cannot view it. Parsing an identity is strict and reports malformed input. Identity discovery never creates the target agent.
Reflected schema graphs are immutable snapshots of the deployed contract. Validate or pack JSON through the reflected constructor or method schema, and treat a missing or malformed declared output as a remote output error.
Load the language-specific reflection skill for concrete SDK APIs and examples.