Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
3fbb1f2
feat: add reusable egress policies for agents and sandboxes
EItanya Oct 12, 2026
fad4f45
test(helm): verify read-only egress policy RBAC
EItanya Oct 13, 2026
0fa902d
fix: validate MCP credential headers and test tool egress
EItanya Oct 13, 2026
2b161ba
style: align egress imports with main
EItanya Oct 13, 2026
41155f6
test: adapt egress fixture to optional harness image
EItanya Oct 14, 2026
8986db7
fix: require current prepared revisions for new instances
EItanya Oct 15, 2026
740e068
test: align runtime lifecycle with revision readiness
EItanya Oct 15, 2026
44ec089
test: exercise Codex egress through shell requests
EItanya Oct 15, 2026
2025898
fix: reconcile egress policy changes on live actors
EItanya Oct 15, 2026
0aa08ad
fix: add live egress storage through a new migration
EItanya Oct 16, 2026
7273e5f
test: exercise live egress through a shared skill on every harness
EItanya Oct 16, 2026
1605e1a
test: keep live egress probes in the foreground
EItanya Oct 16, 2026
ebd8ed7
fix: target live egress updates and keep prepared runtimes available
EItanya Oct 16, 2026
8be4c6c
refactor: clarify token passthrough origin naming
EItanya Oct 16, 2026
93c4054
refactor: persist controller-translated egress policy per revision
EItanya Oct 16, 2026
5f42096
fix: finish live egress review follow-ups
EItanya Oct 16, 2026
3830fdd
fix: skip unchanged egress updates and separate revision promotion
EItanya Oct 16, 2026
21f7ed8
test: make egress probe runs and expectations explicit
EItanya Oct 16, 2026
3ddf7df
fix: serialize egress publication per revision
EItanya Oct 16, 2026
61ef128
test: verify sessions use the last successful revision after invalid …
EItanya Oct 16, 2026
4cee234
refactor: fold egress schema into the initial migration
EItanya Oct 16, 2026
1cce50d
test: wait for agent retirement before asserting session rejection
EItanya Oct 16, 2026
0c40891
refactor: queue egress policy publication by revision
EItanya Oct 16, 2026
3924730
refactor: record revisions and initial egress policies atomically
EItanya Oct 16, 2026
73d1543
refactor: own live egress grants on source definitions
EItanya Oct 16, 2026
7e1735c
test: cover agent grants during compilation failures
EItanya Oct 16, 2026
9e14248
fix: simplify egress reconciliation and preserve validation semantics
EItanya Oct 16, 2026
447ec5b
refactor: apply live egress during source preparation
EItanya Oct 16, 2026
82155bc
refactor: record and promote revisions atomically
EItanya Oct 16, 2026
d46ad70
refactor: name source policy access EgressGrant
EItanya Oct 16, 2026
1c83653
refactor: share harness skills paths with e2e tests
EItanya Oct 16, 2026
88119e9
fix: simplify egress ownership and allow HTTP credentials
EItanya Oct 16, 2026
61288e3
fix: admit egress grants independently of runtime readiness
EItanya Oct 16, 2026
ab2ce58
refactor: simplify egress admission and policy application
EItanya Oct 17, 2026
18d1f4a
refactor: make egress grant admission explicit
EItanya Oct 17, 2026
bf011d5
docs: correct egress credential test description
EItanya Oct 17, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions docs/architecture/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ the agent processes.
| `Harness` | Kubernetes (`api.kagent.dev/v1alpha3`) | Runtime implementation, workload, credentials, capacity, and snapshot policy |
| `AgentTemplate` | Kubernetes (`api.kagent.dev/v1alpha3`) | Portable agent behavior: model, prompt, tools, skills, and plugins |
| `SandboxTemplate` | Kubernetes (`api.kagent.dev/v1alpha3`) | Tools image, environment, and preparation policy for standalone sandboxes |
| `EgressPolicy` | Kubernetes (`api.kagent.dev/v1alpha3`) | Additional HTTP(S) origins and gateway credentials selected by Agents and SandboxTemplates |
| prepared revision | PostgreSQL and ate-api | Immutable compiled runtime input and its Substrate ActorTemplate |
| `Session` | PostgreSQL, exposed by gRPC | Stable conversation identity and runtime lifecycle |
| `Sandbox` | PostgreSQL, exposed by gRPC and MCP | Owner-scoped scratch environment with process/file access and expiration |
Expand Down Expand Up @@ -95,6 +96,8 @@ cleanup. Session lifecycle workers independently pause/suspend idle Actors.

## Documents

- [Egress policies](egress-policies.md)
- [Runtime credential injection](credential-injection.md)
- [Configuration and compilation](configuration-and-compilation.md)
- [Runtime and lifecycle](runtime-and-lifecycle.md)
- [Client lifecycle retries](../lifecycle-retries.md)
Expand Down
11 changes: 7 additions & 4 deletions docs/architecture/configuration-and-compilation.md
Original file line number Diff line number Diff line change
Expand Up @@ -172,9 +172,11 @@ revision. AgentTemplate is shared context with no runtime status. Child template
references are resolved under the root Agent's Harness; they do not require
separate Agents or matching Harness references.

A failed compile or apply leaves the previous successful revision available.
Sessions pin a prepared revision, so later template edits do not mutate a
running session.
A failed compile or apply retains the previous successful revision, which
remains available for fresh Sessions during pending or failed edits. Initial
creation requires a successful revision. Existing Sessions and creation retries
keep their pinned revision. Explicit egress grants use current policies
independently of runtime preparation.

Harness compilers only translate inputs. The controller and Substrate adapter own
application and readiness. The central entry points are
Expand Down Expand Up @@ -391,7 +393,8 @@ no synthetic Kubernetes object is created for an inline template.

Create a session with `kagent agent session create --agent assistant -n kagent`.
The gRPC create request and ScheduledRun target one `agent` resource reference.
The controller selects that Agent's latest successful revision. Deleting an Agent
The store selects that Agent's latest successful revision, including while an
edit is pending or failed. Deleting an Agent
retires its definition; sessions and checkpoints retain their pinned revisions.
Recreating the same name creates a new identity and cannot inherit the old
Agent's last successful revision.
Expand Down
38 changes: 23 additions & 15 deletions docs/architecture/credential-injection.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,21 @@
# Runtime credential injection

Kagent requires Substrate **v0.4.0-alpha1**. The compiler turns ModelConfig API
keys and Secret-backed RemoteMCPServer headers into destination-scoped egress
bindings. Substrate's gateway fetches the referenced Kubernetes Secret and
Kagent requires Substrate **v0.5.0-alpha2**. The runtime compiler turns
ModelConfig API keys and Secret-backed RemoteMCPServer headers into pinned
destination-scoped bindings. Independently, EgressPolicy admission supplies
additional live bindings. Substrate's gateway fetches the referenced Kubernetes Secret and
replaces the outgoing HTTP header when the request carries a placeholder. SDKs
receive an inert placeholder where they require an API key; real credentials never enter compiled environments,
runtime configuration, or revision provenance.

Bindings are persisted with the prepared revision and installed before a
session becomes ready, including retries and checkpoint forks. Secret names,
keys, destinations, and headers affect revision identity. Secret values and
Secret UIDs do not. Rotation is handled by the gateway; its credential cache can
Inferred integration bindings are persisted with the prepared revision; their
Secret names, keys, destinations, and headers affect revision identity. Explicit
EgressPolicy bindings are resolved from current policies and update live actors
without changing that revision. Conflicts hold new grants and report the
independent [EgressPoliciesApplied condition](egress-policies.md#preparation-and-lifecycle);
they do not block runtime compilation. Both are installed before execution, including
creation retries, resume, and checkpoint forks. Secret values and Secret UIDs
do not affect revision identity. Rotation is handled by the gateway; its credential cache can
take up to five minutes to refresh, without recompiling or restarting an agent.

## Installation
Expand Down Expand Up @@ -58,22 +63,25 @@ overrides of these variables are rejected.
| RemoteMCPServer Secret-backed header | Configured header; Secret contains its full value |

Provider endpoint overrides determine the allowed HTTP(S) origin. Egress rules
match its scheme, DNS name, and port; credential bindings remain scoped to the
hostname and header. Different credentials for the same hostname and header
are rejected, including conflicts between models, memory embeddings, and MCP
servers. Use distinct DNS names for
origins requiring different credentials. IP-address destinations are unsupported
by Substrate egress policies.
and credential bindings both match its scheme, DNS name, and port. Different
credentials for the same origin and header are rejected, including conflicts
between models, memory embeddings, MCP servers, and explicit policies. Distinct
ports on the same DNS name can use different credentials. IP-address destinations
are unsupported by Substrate egress policies.

The v1alpha3 revision format stores full origins. It assumes a clean installation;
previously persisted hostname-only credential bindings are rejected rather than
reinterpreted across every port on that host.

Harness and SandboxTemplate environment entries accept only literal `value`
strings, including empty strings. Configure Secret-backed credentials on
ModelConfig or RemoteMCPServer for gateway injection.
ModelConfig, RemoteMCPServer, or [EgressPolicy](egress-policies.md) for gateway injection.

AWS IAM signing keys, Google service-account keys, and OAuth client credentials
require mechanisms beyond static header injection and are rejected rather than
serialized into runtimes.
Caller-token passthrough retains its existing behavior. A passthrough model
cannot share a hostname with static gateway credentials, which would override
cannot share an origin with static gateway credentials, which would override
the caller's authentication.

## Deferred API fields
Expand Down
Loading
Loading