Agent SDKs are ordinary libraries built around asynchronous I/O, typed data, environment configuration, and streamed events. You do not need language mastery to begin, but you must understand functions, collections, exceptions, async iteration, schemas, and package isolation well enough to distinguish your code from provider behavior.
You will create isolated Python and TypeScript projects, load credentials from the process environment, read async code, and handle a stream without swallowing failures.
Python gives beginners a compact continuous path. TypeScript appears when browser/server ecosystems, Zod schemas, or SDK differences matter. The architecture is language-neutral: types, policies, events, and idempotency exist in both.
Python:
TypeScript:
Commit lockfiles. Do not commit .env, virtual environments, node_modules, traces with sensitive data, or provider credentials.
Agent runs wait on networks, tools, processes, and streams. Async code lets one process make progress elsewhere while waiting.
async_basics.py:
TypeScript expresses the same shape with Promise, async, and await. Streams from both SDKs often use async iteration:
Read required credentials once at application startup and fail with a useful message:
Catch an exception only where you can add context, retry safely, translate it into a domain error, or clean up a resource. Preserve the original cause:
Never log environment values to prove they loaded.
Failure injection: Misspell one dictionary key and let your type checker or test catch it. The lesson is not the typo; it is that deterministic defects should fail before they reach a paid model call.
Create a tiny typed event stream in both languages. Add cancellation, a timeout, and a test that proves cleanup still runs when the consumer stops early.