Commit graph

39221 commits

Author SHA1 Message Date
Ishaan Jaffer
66527b6beb test(agent-sdk): add session.followup queueing test 2026-05-06 14:59:56 -07:00
Ishaan Jaffer
bd1539285a test(agent-sdk): add SSE auto-reconnect test 2026-05-06 14:59:56 -07:00
Ishaan Jaffer
b4b6c109e7 test(agent-sdk): add agent-reuse multi-session test 2026-05-06 14:59:56 -07:00
Ishaan Jaffer
4926177cfd test(agent-sdk): add noop-roundtrip end-to-end test 2026-05-06 14:59:56 -07:00
Ishaan Jaffer
e3683ec956 test(agent-sdk): add Run class tests 2026-05-06 14:59:56 -07:00
Ishaan Jaffer
4aae87bd08 test(agent-sdk): add SessionHandle tests 2026-05-06 14:59:56 -07:00
Ishaan Jaffer
e31d20e93d test(agent-sdk): add Agent class tests 2026-05-06 14:59:56 -07:00
Ishaan Jaffer
f69ac9e029
feat(agent_session_endpoints): add /v2/agents CRUD endpoints 2026-05-06 14:59:53 -07:00
Ishaan Jaffer
996427ae70
feat(agent_session_endpoints): add /v2/sessions CRUD + followup + conversation 2026-05-06 14:59:52 -07:00
Ishaan Jaffer
e892489aa7
feat(agent_session_endpoints): add Prisma row to response serialization 2026-05-06 14:59:50 -07:00
Ishaan Jaffer
c8679dfca1
feat(agent_session_endpoints): add Pydantic request/response schemas 2026-05-06 14:59:49 -07:00
Ishaan Jaffer
93954fc5a0 feat(agent-sdk): add followup multi-turn example 2026-05-06 14:59:48 -07:00
Ishaan Jaffer
546c8702de
feat(agent_session_endpoints): add ownership/access-control helpers 2026-05-06 14:59:48 -07:00
Ishaan Jaffer
61e8a07314 feat(agent-sdk): add basic usage example 2026-05-06 14:59:48 -07:00
Ishaan Jaffer
2f0e1d7415 docs(agent-sdk): add README with quickstart and API reference 2026-05-06 14:59:48 -07:00
Ishaan Jaffer
b8e1121eff
feat(agent_session_endpoints): add ID generation helpers 2026-05-06 14:59:43 -07:00
Ishaan Jaffer
f68b984fe2 chore(agent-sdk): tweak package.json repository URL 2026-05-06 14:59:43 -07:00
Ishaan Jaffer
1a9fbc63e6 fix: target /v2/ agent-session API 2026-05-06 14:59:21 -07:00
Ishaan Jaffer
d2601ee875
feat(ui/agents): add /agents list page
Renders the AgentList with a 'New Agent' affordance. Uses useAuthorized
for the access token and the cloud-agents-client for the fetch. In mock
mode this works without a backend so the UI can be developed alongside
Epic A.
2026-05-06 14:54:40 -07:00
Ishaan Jaffer
25cbe4c210
feat(ui/agents): add NewAgentDialog
antd Modal + Form that posts a new cloud-agent definition. Definition-
only — no VM is provisioned at creation time.
2026-05-06 14:54:37 -07:00
Ishaan Jaffer
a9419c514f
feat(ui/agents): add AgentList component
antd Table that renders cloud-agent definitions and links each row to
/agents/{agent_id}. Uses Tag for the model and dayjs.fromNow for the
last-activity column. Empty state is the antd Empty placeholder.
2026-05-06 14:54:31 -07:00
Ishaan Jaffer
1f5c3fd9f2
feat(ui/agents): add useSessionEventStream SSE hook
EventSource hook with auto-reconnect, seq-cursor resume, and dedup.
On error closes the stream and re-opens after 1s backoff, passing
since_seq=<lastSeq> so the server replays missed events. In mock mode
replays MOCK_RUN_EVENTS at 400ms cadence so the UI looks live, and
listens for window offline/online so Playwright can exercise the
reconnect path.
2026-05-06 14:54:29 -07:00
Ishaan Jaffer
2fb39467a7
feat(ui/agents): add cloud-agents API client
Proxy-routed fetches for agents, sessions, runs, conversation, and
followup. Mock-aware: short-circuits to mock-agents.ts when
NEXT_PUBLIC_USE_MOCK_AGENTS=true. Centralizes the SSE URL shape via
buildRunEventStreamUrl so the hook just opens the EventSource.
2026-05-06 14:54:21 -07:00
Ishaan Jaffer
281c10747b infra(spikes): add README for LIT-2888 EC2 spike
Documents how to run the spike, what AWS resources are required (subnet,
SG, IAM instance profile), the cost envelope, and how to clean up the
one-time infra after Epic B ships.
2026-05-06 14:54:20 -07:00
Ishaan Jaffer
1015bc17db
feat(ui/agents): add mock data provider
Wired via NEXT_PUBLIC_USE_MOCK_AGENTS=true. Temporary shim until Epic A
(LIT-2877) lands the real /v1/agents, /v1/sessions, conversation, and
event-stream endpoints. Shapes mirror the API spec for a one-line swap.
Includes a canned MOCK_RUN_EVENTS sequence used by the SSE hook.
2026-05-06 14:54:18 -07:00
Ishaan Jaffer
cad6c83307 infra(spikes): add EC2 provisioning PoC for LIT-2888
Launches t3.large in the BYOC AWS account, fires a user-data HTTPS
callback, sends an SSM RunCommand to a *running* instance to measure
warm-attach latency, and always terminates in a finally block.

The warm-attach latency is the critical number for LIT-2890 (B2):
  <2000ms  -> SSM RunCommand push hydrate
  2000-5000ms -> long-poll daemon
  >5000ms  -> reconsider warm-pool design
2026-05-06 14:54:15 -07:00
Ishaan Jaffer
8507696adb infra(spikes): add Flask callback receiver for LIT-2888 EC2 spike
5-line Flask app on port 3333 that logs callbacks from EC2 user-data and
SSM RunCommand. Used by the EC2 provisioning spike to time when boot
and hydrate callbacks arrive.
2026-05-06 14:54:06 -07:00
Ishaan Jaffer
ae607acb22
feat(ui/agents): add CloudAgent type definitions
Mirrors the API spec from LIT-2877 (Epic A). Single source of truth for
the dashboard so components don't redefine shapes inline. Namespaced
`Cloud*` to avoid colliding with the legacy proxy-side Agent type.
2026-05-06 14:54:02 -07:00
Ishaan Jaffer
49e30b020d
test(agent-sdk): add in-memory mock proxy for tests 2026-05-06 14:52:53 -07:00
Ishaan Jaffer
7ffe2bbdae
feat(agent-sdk): add public surface re-exports 2026-05-06 14:52:53 -07:00
Ishaan Jaffer
82c03fd68a
feat(agent-sdk): add Run class with stream/wait/cancel 2026-05-06 14:52:53 -07:00
Ishaan Jaffer
33eb658f8b
feat(agent-sdk): add SessionHandle with asyncDispose 2026-05-06 14:52:52 -07:00
Ishaan Jaffer
25ffa570c1
feat(agent-sdk): add Agent + AgentHandle classes 2026-05-06 14:52:52 -07:00
Ishaan Jaffer
a7c94022a5
feat(agent-sdk): add SSE client with Last-Event-ID resume 2026-05-06 14:52:52 -07:00
Ishaan Jaffer
8e20ed5ef8
feat(agent-sdk): add fetch wrapper with auth + retry 2026-05-06 14:52:52 -07:00
Ishaan Jaffer
f3965f652a
feat(agent-sdk): add public types and LiteLLMAgentError 2026-05-06 14:52:52 -07:00
Ishaan Jaffer
6fa5f15782
feat(agent-sdk): add vitest config 2026-05-06 14:52:52 -07:00
Ishaan Jaffer
8ffd32036f
feat(agent-sdk): add tsconfig 2026-05-06 14:52:52 -07:00
Ishaan Jaffer
e214328730
feat(agent-sdk): add package.json for @litellm/agent-sdk 2026-05-06 14:52:52 -07:00
Ishaan Jaffer
504c90bad7
feat(agent-sdk): add gitignore for typescript SDK package 2026-05-06 14:52:42 -07:00
Ishaan Jaffer
fc4d40fb1e
feat(agent_session_endpoints): add VM provider registry 2026-05-06 14:52:21 -07:00
Ishaan Jaffer
6ab7f7700e
feat(agent_session_endpoints): add NoopVMProvider for tests 2026-05-06 14:52:21 -07:00
Ishaan Jaffer
6c322cfa60
feat(agent_session_endpoints): add AgentVMProvider ABC 2026-05-06 14:52:21 -07:00
Ishaan Jaffer
6b123c4698
feat(agent_session_endpoints): add daemon JWT auth helpers 2026-05-06 14:52:21 -07:00
Ishaan Jaffer
bcc48e43d7
feat(agent_session_endpoints): add session/run state machine 2026-05-06 14:52:21 -07:00
Ishaan Jaffer
1cadabfc4c
feat(agent_session_endpoints): add module constants 2026-05-06 14:52:21 -07:00
Ishaan Jaffer
2ccf626669
feat(proxy-extras): add migration for agent/session/run tables 2026-05-06 14:52:17 -07:00
Ishaan Jaffer
b386b94282
feat(proxy-extras): mirror agent/session/run models 2026-05-06 14:52:17 -07:00
Ishaan Jaffer
bb8b76adfc
feat(proxy): mirror agent/session/run models in litellm/proxy/schema.prisma 2026-05-06 14:52:17 -07:00
Ishaan Jaffer
725a9c7311
feat(proxy): add agent/session/run Prisma models
Add 4 new tables for the agent_session_endpoints module (Cursor SDK on LiteLLM):

- LiteLLM_Agent: agent definition (model, system prompt, default repos)
- LiteLLM_AgentSession: VM-backed conversation owned by an agent
- LiteLLM_AgentRun: single turn within a session
- LiteLLM_AgentRunEvent: append-only event log for resumable SSE

Includes cascade deletes, idempotency unique constraints, and indexes
for the cleanup sweeper and ownership lookups.
2026-05-06 14:52:01 -07:00